File tree 1 file changed +13
-20
lines changed
sdks/java/io/debezium/src/test/java/org/apache/beam/io/debezium 1 file changed +13
-20
lines changed Original file line number Diff line number Diff line change @@ -188,26 +188,19 @@ public void testWrongPort() {
188
188
}
189
189
190
190
@ Test
191
- public void testWrongHost () throws Exception {
191
+ public void testWrongHost () {
192
192
Pipeline readPipeline = Pipeline .create ();
193
- Exception ex =
194
- assertThrows (
195
- Exception .class ,
196
- () -> {
197
- PCollectionRowTuple .empty (readPipeline )
198
- .apply (
199
- makePtransform (
200
- userName ,
201
- password ,
202
- database ,
203
- databaseContainer .getMappedPort (port ),
204
- "23.128.129.130" ))
205
- .get ("output" );
206
- });
207
- Throwable lowestCause = ex .getCause ();
208
- while (lowestCause .getCause () != null ) {
209
- lowestCause = lowestCause .getCause ();
210
- }
211
- assertThat (lowestCause .getMessage (), Matchers .containsString ("Connection refused" ));
193
+ assertThrows (
194
+ Exception .class ,
195
+ () ->
196
+ PCollectionRowTuple .empty (readPipeline )
197
+ .apply (
198
+ makePtransform (
199
+ userName ,
200
+ password ,
201
+ database ,
202
+ databaseContainer .getMappedPort (port ),
203
+ "169.254.254.254" ))
204
+ .get ("output" ));
212
205
}
213
206
}
You can’t perform that action at this time.
0 commit comments