use of akka.testkit.TestProbe in project controller by opendaylight.
the class LocalReadOnlyProxyTransactionTest method testApplyModifyTransactionRequest.
@Test
public void testApplyModifyTransactionRequest() throws Exception {
final TestProbe probe = createProbe();
final ModifyTransactionRequestBuilder builder = new ModifyTransactionRequestBuilder(TRANSACTION_ID, probe.ref());
builder.setSequence(0);
builder.setAbort();
final ModifyTransactionRequest request = builder.build();
transaction.replayModifyTransactionRequest(request, createCallbackMock(), Ticker.systemTicker().read());
getTester().expectTransactionRequest(AbortLocalTransactionRequest.class);
}
use of akka.testkit.TestProbe in project controller by opendaylight.
the class LocalReadOnlyProxyTransactionTest method testApplyModifyTransactionRequestNotAbort.
@Test
public void testApplyModifyTransactionRequestNotAbort() throws Exception {
final TestProbe probe = createProbe();
final ModifyTransactionRequestBuilder builder = new ModifyTransactionRequestBuilder(TRANSACTION_ID, probe.ref());
builder.setSequence(0);
builder.setReady();
final ModifyTransactionRequest request = builder.build();
assertOperationThrowsException(() -> transaction.replayModifyTransactionRequest(request, createCallbackMock(), Ticker.systemTicker().read()), VerifyException.class);
}
use of akka.testkit.TestProbe in project controller by opendaylight.
the class LocalReadWriteProxyTransactionTest method testHandleForwardedRemoteAbortRequest.
@Test
public void testHandleForwardedRemoteAbortRequest() throws Exception {
final TestProbe probe = createProbe();
final TransactionAbortRequest request = new TransactionAbortRequest(TRANSACTION_ID, 0L, probe.ref());
testHandleForwardedRemoteRequest(request);
}
use of akka.testkit.TestProbe in project controller by opendaylight.
the class LocalReadWriteProxyTransactionTest method testHandleForwardedRemotePreCommitRequest.
@Test
public void testHandleForwardedRemotePreCommitRequest() throws Exception {
final TestProbe probe = createProbe();
final TransactionPreCommitRequest request = new TransactionPreCommitRequest(TRANSACTION_ID, 0L, probe.ref());
testHandleForwardedRemoteRequest(request);
}
use of akka.testkit.TestProbe in project controller by opendaylight.
the class LocalReadWriteProxyTransactionTest method testHandleForwardedRemoteDoCommitRequest.
@Test
public void testHandleForwardedRemoteDoCommitRequest() throws Exception {
final TestProbe probe = createProbe();
final TransactionDoCommitRequest request = new TransactionDoCommitRequest(TRANSACTION_ID, 0L, probe.ref());
testHandleForwardedRemoteRequest(request);
}
Aggregations