Search in sources :

Example 16 with BoltIOException

use of org.neo4j.bolt.messaging.BoltIOException in project neo4j by neo4j.

the class MessageMetadataParserTest method shouldThrowForIncorrectTransactionTimeout.

@Test
void shouldThrowForIncorrectTransactionTimeout() {
    BoltIOException e = assertThrows(BoltIOException.class, () -> parseTransactionTimeout(asMapValue(map("tx_timeout", "15 minutes"))));
    assertTrue(e.causesFailureMessage());
}
Also used : BoltIOException(org.neo4j.bolt.messaging.BoltIOException) Test(org.junit.jupiter.api.Test)

Aggregations

BoltIOException (org.neo4j.bolt.messaging.BoltIOException)16 Test (org.junit.jupiter.api.Test)13 ParameterizedTest (org.junit.jupiter.params.ParameterizedTest)6 MapValue (org.neo4j.values.virtual.MapValue)5 HashMap (java.util.HashMap)2 ValueSource (org.junit.jupiter.params.provider.ValueSource)2 Neo4jPack (org.neo4j.bolt.packstream.Neo4jPack)2 PackedInputArray (org.neo4j.bolt.packstream.PackedInputArray)2 AuthTokenDecoderTest (org.neo4j.bolt.security.auth.AuthTokenDecoderTest)2 BoltProtocolV3ComponentFactory.newNeo4jPack (org.neo4j.bolt.v3.BoltProtocolV3ComponentFactory.newNeo4jPack)2 ValueUtils.asMapValue (org.neo4j.kernel.impl.util.ValueUtils.asMapValue)2 ByteBuf (io.netty.buffer.ByteBuf)1 TransactionStateMachineSPIProvider (org.neo4j.bolt.runtime.statemachine.TransactionStateMachineSPIProvider)1 TransportThrottleException (org.neo4j.bolt.transport.TransportThrottleException)1 HelloMessage (org.neo4j.bolt.v3.messaging.request.HelloMessage)1 HelloMessage (org.neo4j.bolt.v41.messaging.request.HelloMessage)1 DatabaseManagementService (org.neo4j.dbms.api.DatabaseManagementService)1 DatabaseNotFoundException (org.neo4j.dbms.api.DatabaseNotFoundException)1