]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
test: periodic failure in TestJournalReplay.SnapRename
authorJason Dillaman <dillaman@redhat.com>
Thu, 10 Mar 2016 16:50:16 +0000 (11:50 -0500)
committerJason Dillaman <dillaman@redhat.com>
Fri, 11 Mar 2016 12:39:53 +0000 (07:39 -0500)
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>
src/test/librbd/journal/test_Replay.cc

index 49fd479a2501b899999491b093238ff6bc0c6ceb..1f822d617bad5febc2503584d66ecf5947d3e9d4 100644 (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);