File tree Expand file tree Collapse file tree 1 file changed +1
-14
lines changed
wrapper/src/test/java/com/amazon/awslabs/jdbc/plugin/failover Expand file tree Collapse file tree 1 file changed +1
-14
lines changed Original file line number Diff line number Diff line change @@ -98,6 +98,7 @@ void init() throws SQLException {
98
98
closeable = MockitoAnnotations .openMocks (this );
99
99
100
100
when (mockPluginService .getHostListProvider ()).thenReturn (mockHostListProvider );
101
+ when (mockHostListProvider .getRdsUrlType ()).thenReturn (RdsUrlType .RDS_WRITER_CLUSTER );
101
102
when (mockPluginService .getCurrentConnection ()).thenReturn (mockConnection );
102
103
when (mockPluginService .getCurrentHostSpec ()).thenReturn (mockHostSpec );
103
104
when (mockPluginService .connect (any (HostSpec .class ), eq (properties ))).thenReturn (mockConnection );
@@ -523,20 +524,6 @@ void test_execute_withDirectExecute() throws SQLException {
523
524
verify (mockHostListProvider , never ()).getRdsUrlType ();
524
525
}
525
526
526
- @ Test
527
- void test_execute_withInvalidHostListProvider () {
528
- when (mockPluginService .getHostListProvider ()).thenReturn (new FooHostListProvider ());
529
-
530
- initializePlugin ();
531
- assertThrows (SQLException .class , () -> plugin .execute (
532
- ResultSet .class ,
533
- SQLException .class ,
534
- MONITOR_METHOD_INVOKE_ON ,
535
- MONITOR_METHOD_NAME ,
536
- mockSqlFunction ,
537
- EMPTY_ARGS ));
538
- }
539
-
540
527
private void initializePlugin () {
541
528
plugin = new FailoverConnectionPlugin (mockPluginService , properties );
542
529
}
You can’t perform that action at this time.
0 commit comments