@@ -244,7 +244,9 @@ public void testRunWithConfigPath() throws Exception {
244
244
@ Test
245
245
public void testRunAsSysDbaTestConnection () throws Exception {
246
246
String outputPath = tempOutput .getAbsolutePath ();
247
- String [] args = {"-url" , dbaAsSysdbaUrl , "-tc" };
247
+ String dba [] = dbaAsSysdbaUrl .split (" " );
248
+ assertTrue (dba .length ==3 );
249
+ String [] args = {"-url" , dba [0 ], dba [1 ], dba [2 ], "-tc" };
248
250
Main .main (args );
249
251
Assert .assertEquals (
250
252
outContent .toString (),
@@ -256,7 +258,9 @@ public void testRunAsSysDbaTestConnection() throws Exception {
256
258
@ Test
257
259
public void testRunAsSysDbaWithTypeFilter () throws Exception {
258
260
String outputPath = tempOutput .getAbsolutePath ();
259
- String [] args = {"-url" , dbaAsSysdbaUrl , "--type-filter" , "'SCHEDULE', 'JOB'" };
261
+ String dba [] = dbaAsSysdbaUrl .split (" " );
262
+ assertTrue (dba .length ==3 );
263
+ String [] args = {"-url" , dba [0 ], dba [1 ], dba [2 ], "--type-filter" , "'SCHEDULE', 'JOB'" };
260
264
Main .main (args );
261
265
String out = outContent .toString ();
262
266
assertThat (out , containsString ("Will try to process schema [SYS]" ));
@@ -320,7 +324,9 @@ public void testCustomConfigWithSchemaList() throws Exception {
320
324
@ Test
321
325
public void testCustomConfigWithSchemaListAsDba () throws Exception {
322
326
String outputPath = tempOutput .getAbsolutePath ();
323
- String [] args = {"-url" , dbaAsSysdbaUrl , "-c" , "src/test/resources/test_schema_list.config.xml" , "-o" , outputPath };
327
+ String dba [] = dbaAsSysdbaUrl .split (" " );
328
+ assertTrue (dba .length ==3 );
329
+ String [] args = {"-url" , dba [0 ], dba [1 ], dba [2 ], "-c" , "src/test/resources/test_schema_list.config.xml" , "-o" , outputPath };
324
330
Main .main (args );
325
331
String out = outContent .toString ();
326
332
assertThat (out , not (containsString ("Ignore 'schemaList' from advanced config, because oracle user is not connected as sys dba" )));
0 commit comments