Search in sources :

Example 1 with LoadSnapshotFailed

use of akka.persistence.SnapshotProtocol.LoadSnapshotFailed in project controller by opendaylight.

the class LocalSnapshotStoreTest method testDoLoadAsyncWithFailure.

@SuppressWarnings("checkstyle:illegalThrows")
@Test(expected = IOException.class)
public void testDoLoadAsyncWithFailure() throws Throwable {
    createSnapshotFile(PERSISTENCE_ID, null, 1, 2000);
    TestKit probe = new TestKit(system);
    snapshotStore.tell(new SnapshotProtocol.LoadSnapshot(PERSISTENCE_ID, SnapshotSelectionCriteria.latest(), Long.MAX_VALUE), probe.getRef());
    LoadSnapshotFailed failed = probe.expectMsgClass(LoadSnapshotFailed.class);
    throw failed.cause();
}
Also used : SnapshotProtocol(akka.persistence.SnapshotProtocol) LoadSnapshotFailed(akka.persistence.SnapshotProtocol.LoadSnapshotFailed) LoadSnapshot(akka.persistence.SnapshotProtocol.LoadSnapshot) TestKit(akka.testkit.javadsl.TestKit) Test(org.junit.Test)

Aggregations

SnapshotProtocol (akka.persistence.SnapshotProtocol)1 LoadSnapshot (akka.persistence.SnapshotProtocol.LoadSnapshot)1 LoadSnapshotFailed (akka.persistence.SnapshotProtocol.LoadSnapshotFailed)1 TestKit (akka.testkit.javadsl.TestKit)1 Test (org.junit.Test)1