Skip to content

Commit

Permalink
Stub tests migration part 4 (neo4j#847)
Browse files Browse the repository at this point in the history
Removed RoutingDriverMultidatabaseBoltKitIT

Migrated tests:
- shouldDiscoverForDatabase -> test_should_read_successfully_from_reader_using_session_run (this tests seems to cover the same use-case and uses a non-default DB for 4+ versions)
- shouldRetryOnEmptyDiscoveryResult -> test_should_read_successfully_on_empty_discovery_result_using_session_run
- shouldThrowRoutingErrorIfDatabaseNotFound -> test_should_fail_with_routing_failure_on_db_not_found_discovery_failure
- shouldBeAbleToServeReachableDatabase -> test_should_read_successfully_from_reachable_db_after_trying_unreachable_db (message check has been removed)
- shouldPassSystemBookmarkWhenGettingRoutingTableForMultiDB -> test_should_pass_system_bookmark_when_getting_rt_for_multi_db (seems to be applicable to V4 only, also the stub server doesn't seem to check bookmarks)
- shouldIgnoreSystemBookmarkWhenGettingRoutingTable -> test_should_ignore_system_bookmark_when_getting_rt_for_multi_db
- shouldDriverVerifyConnectivity -> test_should_successfully_get_routing_table_with_context (pre-existing test that already tests the connectivity)

Also removed redundant scripts and added code support to DriverError
  • Loading branch information
injectives authored Mar 5, 2021
1 parent e780740 commit 47db433
Show file tree
Hide file tree
Showing 12 changed files with 9 additions and 346 deletions.

This file was deleted.

10 changes: 0 additions & 10 deletions driver/src/test/resources/acquire_endpoints_v4.script

This file was deleted.

This file was deleted.

10 changes: 0 additions & 10 deletions driver/src/test/resources/acquire_endpoints_v4_empty.script

This file was deleted.

15 changes: 0 additions & 15 deletions driver/src/test/resources/acquire_endpoints_v4_multi_db.script

This file was deleted.

This file was deleted.

10 changes: 0 additions & 10 deletions driver/src/test/resources/acquire_endpoints_v4_virtual_host.script

This file was deleted.

This file was deleted.

12 changes: 0 additions & 12 deletions driver/src/test/resources/read_server_v3_read_with_bookmark.script

This file was deleted.

12 changes: 0 additions & 12 deletions driver/src/test/resources/read_server_v4_read_with_bookmark.script

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,13 @@ else if ( currentLine.equals( "#request end" ) )

private DriverError driverError( String id, Neo4jException e )
{
return DriverError.builder().data( DriverError.DriverErrorBody.builder().id( id ).errorType( e.getClass().getName() ).build() ).build();
return DriverError.builder().data(
DriverError.DriverErrorBody.builder()
.id( id )
.errorType( e.getClass().getName() )
.code( e.code() )
.build() )
.build();
}

public void processRequest( String request )
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,5 +43,7 @@ public static class DriverErrorBody
private String id;

private String errorType;

private String code;
}
}

0 comments on commit 47db433

Please sign in to comment.