@@ -249,19 +249,13 @@ protected void testGenerateSpec(AbstractDBSpecificConnector connector, String pl
249
249
}
250
250
Set <PluginSpec > relatedPlugins = connectorSpec .getRelatedPlugins ();
251
251
Assert .assertEquals (2 , relatedPlugins .size ());
252
- Iterator <PluginSpec > relatedPluginsIterator = relatedPlugins .iterator ();
253
- PluginSpec pluginSpec = relatedPluginsIterator .next ();
252
+ Iterator <PluginSpec > iterator = relatedPlugins .iterator ();
253
+ PluginSpec pluginSpec = iterator .next ();
254
254
Assert .assertEquals (pluginName , pluginSpec .getName ());
255
- Assert .assertTrue (pluginSpec .getType ().equals (BatchSource .PLUGIN_TYPE ) ||
256
- pluginSpec .getType ().equals (BatchSink .PLUGIN_TYPE ));
257
- PluginSpec pluginSpec1 = relatedPluginsIterator .next ();
258
- Assert .assertEquals (pluginName , pluginSpec1 .getName ());
259
- if (pluginSpec .getType ().equals (BatchSink .PLUGIN_TYPE )) {
260
- Assert .assertEquals (BatchSource .PLUGIN_TYPE , pluginSpec1 .getType ());
261
- } else {
262
- Assert .assertEquals (BatchSink .PLUGIN_TYPE , pluginSpec1 .getType ());
263
- }
264
-
255
+ Assert .assertEquals (BatchSink .PLUGIN_TYPE , pluginSpec .getType ());
256
+ pluginSpec = iterator .next ();
257
+ Assert .assertEquals (pluginName , pluginSpec .getName ());
258
+ Assert .assertEquals (BatchSource .PLUGIN_TYPE , pluginSpec .getType ());
265
259
Map <String , String > properties = pluginSpec .getProperties ();
266
260
Assert .assertNull (properties .get (NAME_USE_CONNECTION ));
267
261
Assert .assertNull (properties .get (NAME_CONNECTION ));
0 commit comments