use of com.yahoo.messagebus.routing.RetryTransientErrorsPolicy in project vespa by vespa-engine.
the class MessageBusTestCase method requireThatBucketSequencingWithResenderEnabledCausesError.
@Test
public void requireThatBucketSequencingWithResenderEnabledCausesError() throws ListenFailedException {
Slobrok slobrok = new Slobrok();
TestServer server = new TestServer(new MessageBusParams().addProtocol(new SimpleProtocol()).setRetryPolicy(new RetryTransientErrorsPolicy()), new RPCNetworkParams().setSlobrokConfigId(slobrok.configId()));
Receptor receptor = new Receptor();
SourceSession session = server.mb.createSourceSession(new SourceSessionParams().setTimeout(600.0).setReplyHandler(receptor));
assertTrue(session.send(new SimpleMessage("foo") {
@Override
public boolean hasBucketSequence() {
return true;
}
}.setRoute(Route.parse("bar"))).isAccepted());
Reply reply = receptor.getReply(60);
assertNotNull(reply);
assertEquals(1, reply.getNumErrors());
assertEquals(ErrorCode.SEQUENCE_ERROR, reply.getError(0).getCode());
session.destroy();
server.destroy();
slobrok.stop();
}
Aggregations