mirror of
https://github.com/transmission/transmission.git
synced 2025-12-20 02:18:42 +00:00
test: fix race condition in rename-test (#2612)
This commit is contained in:
@@ -102,6 +102,7 @@ static bool verifyTorrent(tr_torrent* tor, bool const* stopFlag)
|
|||||||
changed |= hasPiece != hadPiece;
|
changed |= hasPiece != hadPiece;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
tor->checked_pieces_.set(piece, true);
|
||||||
tor->markChanged();
|
tor->markChanged();
|
||||||
|
|
||||||
/* sleeping even just a few msec per second goes a long
|
/* sleeping even just a few msec per second goes a long
|
||||||
|
|||||||
@@ -437,7 +437,13 @@ protected:
|
|||||||
EXPECT_FALSE(tr_amInEventThread(tor->session));
|
EXPECT_FALSE(tr_amInEventThread(tor->session));
|
||||||
tr_torrentVerify(tor);
|
tr_torrentVerify(tor);
|
||||||
tr_wait_msec(100);
|
tr_wait_msec(100);
|
||||||
EXPECT_TRUE(waitFor([tor]() { return tor->verifyState == TR_VERIFY_NONE; }, 4000));
|
EXPECT_TRUE(waitFor(
|
||||||
|
[tor]()
|
||||||
|
{
|
||||||
|
auto const activity = tr_torrentGetActivity(tor);
|
||||||
|
return activity != TR_STATUS_CHECK && activity != TR_STATUS_CHECK_WAIT && tor->checked_pieces_.hasAll();
|
||||||
|
},
|
||||||
|
4000));
|
||||||
}
|
}
|
||||||
|
|
||||||
tr_session* session_ = nullptr;
|
tr_session* session_ = nullptr;
|
||||||
|
|||||||
Reference in New Issue
Block a user