use of org.neo4j.bolt.v1.transport.BoltProtocolV1 in project neo4j by neo4j.
the class BoltProtocolV1Test method messageProcessingErrorIsLogged.
@Test
public void messageProcessingErrorIsLogged() throws IOException {
RuntimeException error = new RuntimeException("Unexpected error!");
ByteBuf data = newThrowingByteBuf(error);
AssertableLogProvider assertableLogProvider = new AssertableLogProvider();
SimpleLogService logService = new SimpleLogService(NullLogProvider.getInstance(), assertableLogProvider);
BoltProtocolV1 protocol = new BoltProtocolV1(mock(BoltWorker.class), newChannelMock(), logService);
protocol.handle(mock(ChannelHandlerContext.class), data);
assertableLogProvider.assertExactly(inLog(BoltProtocolV1.class).error(equalTo("Failed to handle incoming Bolt message. Connection will be closed."), equalTo(error)));
}
Aggregations