test: periodic failure in TestJournalReplay.SnapRename

Force the refresh of the image to pick up the new snapshot
name before testing that it successfully was renamed.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
This commit is contained in:
Jason Dillaman 2016-03-10 11:50:16 -05:00
parent 164de7aa39
commit fdeb125581

View File

@ -11,6 +11,7 @@
#include "librbd/AioImageRequestWQ.h"
#include "librbd/ExclusiveLock.h"
#include "librbd/ImageCtx.h"
#include "librbd/ImageState.h"
#include "librbd/ImageWatcher.h"
#include "librbd/internal.h"
#include "librbd/Journal.h"
@ -444,6 +445,7 @@ TEST_F(TestJournalReplay, SnapRename) {
get_journal_commit_position(ictx, &current_tag, &current_entry);
ASSERT_EQ(initial_tag, current_tag);
ASSERT_EQ(initial_entry + 2, current_entry);
ASSERT_EQ(0, ictx->state->refresh());
{
RWLock::RLocker snap_locker(ictx->snap_lock);