File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed
driver/src/test/java/org/neo4j/driver/v1/integration Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change 2828import org .neo4j .driver .v1 .Session ;
2929import org .neo4j .driver .v1 .StatementResult ;
3030import org .neo4j .driver .v1 .exceptions .ClientException ;
31+ import org .neo4j .driver .v1 .exceptions .Neo4jException ;
3132import org .neo4j .driver .v1 .util .TestNeo4j ;
3233
3334import static org .hamcrest .CoreMatchers .equalTo ;
@@ -112,15 +113,17 @@ public void shouldKillLongRunningStatement() throws Throwable
112113
113114 fail ("Should have got an exception about statement get killed." );
114115 }
115- catch ( ClientException e )
116+ catch ( Neo4jException e )
116117 {
117118 endTime = System .currentTimeMillis ();
118- assertThat ( e .code (), equalTo ("Neo.ClientError.Procedure.ProcedureCallFailed" ) );
119-
120119 assertTrue ( startTime > 0 );
121120 assertTrue ( endTime - startTime > killTimeout * 1000 ); // get killed by session.kill
122121 assertTrue ( endTime - startTime < executionTimeout * 1000 / 2 ); // finished before execution finished
123122 }
123+ catch ( Exception e )
124+ {
125+ fail ( "Should be a Neo4jException" );
126+ }
124127 }
125128
126129 @ Test
You can’t perform that action at this time.
0 commit comments