/// <exception cref="System.Exception"/> public virtual void TestSBNCheckpoints() { JournalSet standbyJournalSet = NameNodeAdapter.SpyOnJournalSet(nn1); DoEdits(0, 10); HATestUtil.WaitForStandbyToCatchUp(nn0, nn1); // Once the standby catches up, it should notice that it needs to // do a checkpoint and save one to its local directories. HATestUtil.WaitForCheckpoint(cluster, 1, ImmutableList.Of(12)); GenericTestUtils.WaitFor(new _Supplier_147(this), 1000, 60000); // It should have saved the oiv image too. NUnit.Framework.Assert.AreEqual("One file is expected", 1, tmpOivImgDir.List().Length ); // It should also upload it back to the active. HATestUtil.WaitForCheckpoint(cluster, 0, ImmutableList.Of(12)); // The standby should never try to purge edit logs on shared storage. Org.Mockito.Mockito.Verify(standbyJournalSet, Org.Mockito.Mockito.Never()).PurgeLogsOlderThan (Org.Mockito.Mockito.AnyLong()); }