20
20
import static org .junit .Assert .assertThrows ;
21
21
22
22
import com .google .cloud .alloydb .v1alpha .InstanceName ;
23
- import java .io .IOException ;
24
23
import java .util .Collections ;
25
24
import java .util .Properties ;
26
25
import org .junit .Before ;
@@ -38,7 +37,7 @@ public void setUp() {
38
37
}
39
38
40
39
@ Test
41
- public void create_failOnInvalidInstanceName () throws IOException {
40
+ public void create_failOnInvalidInstanceName () {
42
41
IllegalArgumentException ex =
43
42
assertThrows (
44
43
IllegalArgumentException .class ,
@@ -53,7 +52,7 @@ public void create_failOnInvalidInstanceName() throws IOException {
53
52
}
54
53
55
54
@ Test
56
- public void create_failOnEmptyTargetPrincipal () throws IOException , InterruptedException {
55
+ public void create_failOnEmptyTargetPrincipal () {
57
56
IllegalArgumentException ex =
58
57
assertThrows (
59
58
IllegalArgumentException .class ,
@@ -72,7 +71,7 @@ public void create_failOnEmptyTargetPrincipal() throws IOException, InterruptedE
72
71
}
73
72
74
73
@ Test
75
- public void registerConnection_failWithDuplicateName () throws InterruptedException {
74
+ public void registerConnection_failWithDuplicateName () {
76
75
// Register a Connection
77
76
String namedConnector = "my-connection-name" ;
78
77
ConnectorConfig configWithDetails = new ConnectorConfig .Builder ().build ();
@@ -89,8 +88,7 @@ public void registerConnection_failWithDuplicateName() throws InterruptedExcepti
89
88
}
90
89
91
90
@ Test
92
- public void registerConnection_failWithDuplicateNameAndDifferentConfig ()
93
- throws InterruptedException {
91
+ public void registerConnection_failWithDuplicateNameAndDifferentConfig () {
94
92
String namedConnector = "test-connection" ;
95
93
ConnectorConfig config =
96
94
new ConnectorConfig .
Builder ().
withTargetPrincipal (
"[email protected] " ).
build ();
@@ -110,7 +108,7 @@ public void registerConnection_failWithDuplicateNameAndDifferentConfig()
110
108
}
111
109
112
110
@ Test
113
- public void closeNamedConnection_failWhenNotFound () throws InterruptedException {
111
+ public void closeNamedConnection_failWhenNotFound () {
114
112
String namedConnector = "a-connection" ;
115
113
// Assert that you can't close a connection that doesn't exist
116
114
IllegalArgumentException ex =
@@ -123,7 +121,7 @@ public void closeNamedConnection_failWhenNotFound() throws InterruptedException
123
121
}
124
122
125
123
@ Test
126
- public void connect_failOnClosedNamedConnection () throws InterruptedException {
124
+ public void connect_failOnClosedNamedConnection () {
127
125
// Register a Connection
128
126
String namedConnector = "my-connection" ;
129
127
ConnectorConfig configWithDetails = new ConnectorConfig .Builder ().build ();
@@ -149,7 +147,7 @@ public void connect_failOnClosedNamedConnection() throws InterruptedException {
149
147
}
150
148
151
149
@ Test
152
- public void connect_failOnUnknownNamedConnection () throws InterruptedException {
150
+ public void connect_failOnUnknownNamedConnection () {
153
151
// Attempt and fail to connect using the Named Connection not registered
154
152
String namedConnector = "first-connection" ;
155
153
Properties connProps = new Properties ();
@@ -166,7 +164,7 @@ public void connect_failOnUnknownNamedConnection() throws InterruptedException {
166
164
}
167
165
168
166
@ Test
169
- public void connect_failOnNamedConnectionAfterResetInstance () throws InterruptedException {
167
+ public void connect_failOnNamedConnectionAfterResetInstance () {
170
168
// Register a Connection
171
169
String namedConnector = "this-connection" ;
172
170
ConnectorConfig config = new ConnectorConfig .Builder ().build ();
0 commit comments