Skip to content
Snippets Groups Projects
Commit 2cd49b28 authored by François-Simon Fauteux-Chapleau's avatar François-Simon Fauteux-Chapleau
Browse files

unitTest: fix fileTransfer

testAskToMultipleParticipants was failing because of a temporary file
that was generated by the previous test and not deleted at the end.

GitLab: #1126
Change-Id: I5a98d259ba974fe72ced94ca3ccecb611a60dc2a
parent 68fc552f
No related branches found
No related tags found
No related merge requests found
...@@ -155,9 +155,11 @@ FileTransferTest::setUp() ...@@ -155,9 +155,11 @@ FileTransferTest::setUp()
void void
FileTransferTest::tearDown() FileTransferTest::tearDown()
{ {
std::filesystem::remove(sendPath); for (auto path : {sendPath, recvPath, recv2Path}) {
std::filesystem::remove(recvPath); std::filesystem::remove(path);
std::filesystem::remove(recv2Path); path += ".tmp";
std::filesystem::remove(path);
}
wait_for_removal_of({aliceId, bobId, carlaId}); wait_for_removal_of({aliceId, bobId, carlaId});
} }
...@@ -446,8 +448,6 @@ FileTransferTest::testBadSha3sumIn() ...@@ -446,8 +448,6 @@ FileTransferTest::testBadSha3sumIn()
// The file transfer will be sent but refused by bob // The file transfer will be sent but refused by bob
CPPUNIT_ASSERT(cv.wait_for(lk, 30s, [&]() { return aliceData.code == static_cast<int>(libjami::DataTransferEventCode::finished); })); CPPUNIT_ASSERT(cv.wait_for(lk, 30s, [&]() { return aliceData.code == static_cast<int>(libjami::DataTransferEventCode::finished); }));
CPPUNIT_ASSERT(!cv.wait_for(lk, 30s, [&]() { return bobData.code == static_cast<int>(libjami::DataTransferEventCode::finished); })); CPPUNIT_ASSERT(!cv.wait_for(lk, 30s, [&]() { return bobData.code == static_cast<int>(libjami::DataTransferEventCode::finished); }));
std::filesystem::remove(sendPath);
} }
void void
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment