Skip to content

Commit

Permalink
Remove unnecessary fully qualified name for statically imported fields
Browse files Browse the repository at this point in the history
  • Loading branch information
hansenmc committed Dec 23, 2021
1 parent 19d4552 commit d416ea6
Showing 1 changed file with 30 additions and 30 deletions.
60 changes: 30 additions & 30 deletions src/test/java/com/marklogic/developer/corb/ManagerIT.java
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ public void testManagerUsingSysProps() {
String exportFileName = "testManagerUsingSysProps2.txt";
ManagerTest.setDefaultSystemProperties();
System.setProperty(Options.URIS_MODULE, "src/test/resources/selector.xqy|ADHOC");
System.setProperty(Options.EXPORT_FILE_NAME, exportFileName);
System.setProperty(EXPORT_FILE_NAME, exportFileName);
String[] args = null;
File report = new File(ManagerTest.EXPORT_FILE_DIR + SLASH + exportFileName);
report.deleteOnExit();
Expand All @@ -189,11 +189,11 @@ public void testManagerFailOnErrorFalseDefaultExitCode() {
clearSystemProperties();
ManagerTest.setDefaultSystemProperties();
System.setProperty(Options.URIS_FILE, "src/test/resources/test-file-1.txt");
System.setProperty(Options.PROCESS_MODULE, "INLINE-XQUERY|declare variable $URI external; if ($URI = ('a')) then fn:error(xs:QName('error'), 'boom') else $URI");
System.setProperty(PROCESS_MODULE, "INLINE-XQUERY|declare variable $URI external; if ($URI = ('a')) then fn:error(xs:QName('error'), 'boom') else $URI");
System.setProperty(Options.FAIL_ON_ERROR, "false");
System.clearProperty(Options.PRE_BATCH_TASK);
System.clearProperty(Options.POST_BATCH_TASK);
System.clearProperty(Options.PROCESS_TASK);
System.clearProperty(PROCESS_TASK);
System.clearProperty(Options.EXPORT_FILE_DIR);
System.clearProperty(Options.METRICS_LOG_LEVEL);
String[] args = null;
Expand All @@ -208,7 +208,7 @@ public void testManagerFailOnErrorFalseCustomExitCode() {
clearSystemProperties();
ManagerTest.setDefaultSystemProperties();
System.setProperty(Options.URIS_FILE, "src/test/resources/test-file-1.txt");
System.setProperty(Options.PROCESS_MODULE, "INLINE-XQUERY|declare variable $URI external; if ($URI = ('a')) then fn:error(xs:QName('error'), 'boom') else $URI");
System.setProperty(PROCESS_MODULE, "INLINE-XQUERY|declare variable $URI external; if ($URI = ('a')) then fn:error(xs:QName('error'), 'boom') else $URI");
System.setProperty(Options.FAIL_ON_ERROR, "false");
System.setProperty(Options.EXIT_CODE_IGNORED_ERRORS, customErrorCode);
System.clearProperty(Options.PRE_BATCH_TASK);
Expand All @@ -227,7 +227,7 @@ public void testManagerFailOnErrorTrueDefaultExitCode() {
clearSystemProperties();
ManagerTest.setDefaultSystemProperties();
System.setProperty(Options.URIS_FILE, "src/test/resources/test-file-1.txt");
System.setProperty(Options.PROCESS_MODULE, "INLINE-XQUERY|declare variable $URI external; if ($URI = ('a')) then fn:error(xs:QName('error'), 'boom') else $URI");
System.setProperty(PROCESS_MODULE, "INLINE-XQUERY|declare variable $URI external; if ($URI = ('a')) then fn:error(xs:QName('error'), 'boom') else $URI");
System.setProperty(Options.FAIL_ON_ERROR, "true");
System.clearProperty(Options.PRE_BATCH_TASK);
System.clearProperty(Options.POST_BATCH_TASK);
Expand All @@ -250,7 +250,7 @@ public void testManagerUsingSysPropsLargeUrisList() {
properties.setProperty(Options.URIS_MODULE, LARGE_URIS_MODULE);
properties.setProperty(Options.URIS_MODULE + ".count", String.valueOf(uriCount));
properties.setProperty(Options.BATCH_SIZE, String.valueOf(1));
properties.setProperty(Options.EXPORT_FILE_NAME, exportFilename);
properties.setProperty(EXPORT_FILE_NAME, exportFilename);
properties.setProperty(Options.DISK_QUEUE, "true");
properties.setProperty(Options.DISK_QUEUE_MAX_IN_MEMORY_SIZE, String.valueOf(10));
properties.setProperty(Options.DISK_QUEUE_TEMP_DIR, "/var/tmp");
Expand Down Expand Up @@ -280,7 +280,7 @@ public void testManagerUsingSysPropsLargeUrisListAndBatchSize() {
properties.setProperty(Options.URIS_MODULE, LARGE_URIS_MODULE);
properties.setProperty(Options.URIS_MODULE + ".count", String.valueOf(uriCount));
properties.setProperty(Options.BATCH_SIZE, String.valueOf(batchSize));
properties.setProperty(Options.EXPORT_FILE_NAME, exportFilename);
properties.setProperty(EXPORT_FILE_NAME, exportFilename);
properties.setProperty(Options.DISK_QUEUE_MAX_IN_MEMORY_SIZE, String.valueOf(10));

Manager manager = new Manager();
Expand All @@ -302,7 +302,7 @@ public void testManagerUsingPropsFile() {
String exportFileName = ManagerTest.EXPORT_FILE_DIR + SLASH + "testManagerUsingPropsFile.txt";
clearSystemProperties();
System.setProperty(Options.OPTIONS_FILE, "src/test/resources/helloWorld.properties");
System.setProperty(Options.EXPORT_FILE_NAME, exportFileName);
System.setProperty(EXPORT_FILE_NAME, exportFileName);
String[] args = {};
File report = new File(exportFileName);
report.deleteOnExit();
Expand All @@ -321,7 +321,7 @@ public void testManagerUsingInputFile() {
clearSystemProperties();
String exportFileName = "testManagerUsingInputFile.txt";
ManagerTest.setDefaultSystemProperties();
System.setProperty(Options.EXPORT_FILE_NAME, exportFileName);
System.setProperty(EXPORT_FILE_NAME, exportFileName);
System.setProperty(Options.URIS_FILE, "src/test/resources/uriInputFile.txt");
String[] args = {};
String exportFilePath = ManagerTest.EXPORT_FILE_DIR + SLASH + exportFileName;
Expand All @@ -341,7 +341,7 @@ public void testManagersPreBatchTask() {
clearSystemProperties();
String exportFileName = "testManagersPreBatchTask.txt";
ManagerTest.setDefaultSystemProperties();
System.setProperty(Options.EXPORT_FILE_NAME, exportFileName);
System.setProperty(EXPORT_FILE_NAME, exportFileName);
System.setProperty(Options.PRE_BATCH_MODULE, "preBatchModule.xqy|ADHOC");
System.setProperty(Options.PRE_BATCH_TASK, "com.marklogic.developer.corb.PreBatchUpdateFileTask");
String[] args = {};
Expand All @@ -363,7 +363,7 @@ public void testManagersPostBatchTask() {
clearSystemProperties();
String exportFileName = "testManagersPostBatchTask.txt";
ManagerTest.setDefaultSystemProperties();
System.setProperty(Options.EXPORT_FILE_NAME, exportFileName);
System.setProperty(EXPORT_FILE_NAME, exportFileName);
System.setProperty(Options.POST_BATCH_MODULE, "postBatchModule.xqy|ADHOC");
System.setProperty(Options.POST_BATCH_TASK, "com.marklogic.developer.corb.PostBatchUpdateFileTask");
String[] args = {};
Expand All @@ -385,7 +385,7 @@ public void testManagersPostBatchTaskZip() {
clearSystemProperties();
String exportFileName = "testManagersPostBatchTaskZip.txt";
ManagerTest.setDefaultSystemProperties();
System.setProperty(Options.EXPORT_FILE_NAME, exportFileName);
System.setProperty(EXPORT_FILE_NAME, exportFileName);
System.setProperty(Options.EXPORT_FILE_AS_ZIP, Boolean.toString(true));
String[] args = {};
//First, verify the output using run()
Expand All @@ -412,9 +412,9 @@ public void testManagerJavaScriptTransform() {
clearSystemProperties();
String exportFileName = "testManagerJavaScriptTransform.txt";
ManagerTest.setDefaultSystemProperties();
System.setProperty(Options.PROCESS_MODULE, "src/test/resources/mod-print-uri.sjs|ADHOC");
System.setProperty(PROCESS_MODULE, "src/test/resources/mod-print-uri.sjs|ADHOC");
System.setProperty("XQUERY-MODULE.foo", "bar1");
System.setProperty(Options.EXPORT_FILE_NAME, exportFileName);
System.setProperty(EXPORT_FILE_NAME, exportFileName);
String[] args = {};

String exportFilePath = ManagerTest.EXPORT_FILE_DIR + SLASH + exportFileName;
Expand Down Expand Up @@ -478,12 +478,12 @@ public void testCommandFilePause() {
exportFile.deleteOnExit();
File commandFile = new File(ManagerTest.EXPORT_FILE_DIR, Math.random() + EXT_TXT);
commandFile.deleteOnExit();
System.setProperty(Options.XCC_CONNECTION_URI, ManagerTest.XCC_CONNECTION_URI);
System.setProperty(XCC_CONNECTION_URI, ManagerTest.XCC_CONNECTION_URI);
System.setProperty(Options.URIS_FILE, ManagerTest.URIS_FILE);
System.setProperty(Options.THREAD_COUNT, Integer.toString(1));
System.setProperty(Options.PROCESS_MODULE, TRANSFORM_SLOW_MODULE);
System.setProperty(Options.PROCESS_TASK, ManagerTest.PROCESS_TASK);
System.setProperty(Options.EXPORT_FILE_NAME, ManagerTest.EXPORT_FILE_NAME);
System.setProperty(PROCESS_MODULE, TRANSFORM_SLOW_MODULE);
System.setProperty(PROCESS_TASK, ManagerTest.PROCESS_TASK);
System.setProperty(EXPORT_FILE_NAME, ManagerTest.EXPORT_FILE_NAME);
System.setProperty(Options.EXPORT_FILE_DIR, ManagerTest.EXPORT_FILE_DIR);
System.setProperty(Options.COMMAND_FILE, commandFile.getAbsolutePath());

Expand Down Expand Up @@ -538,12 +538,12 @@ public void testCommandFilePauseResumeWhenCommandFileChangedAndNoCommand() {
exportFile.deleteOnExit();
File commandFile = new File(ManagerTest.EXPORT_FILE_DIR, Math.random() + EXT_TXT);
commandFile.deleteOnExit();
System.setProperty(Options.XCC_CONNECTION_URI, ManagerTest.XCC_CONNECTION_URI);
System.setProperty(XCC_CONNECTION_URI, ManagerTest.XCC_CONNECTION_URI);
System.setProperty(Options.URIS_FILE, ManagerTest.URIS_FILE);
System.setProperty(Options.THREAD_COUNT, Integer.toString(1));
System.setProperty(Options.PROCESS_MODULE, TRANSFORM_SLOW_MODULE);
System.setProperty(Options.PROCESS_TASK, ManagerTest.PROCESS_TASK);
System.setProperty(Options.EXPORT_FILE_NAME, ManagerTest.EXPORT_FILE_NAME);
System.setProperty(PROCESS_MODULE, TRANSFORM_SLOW_MODULE);
System.setProperty(PROCESS_TASK, ManagerTest.PROCESS_TASK);
System.setProperty(EXPORT_FILE_NAME, ManagerTest.EXPORT_FILE_NAME);
System.setProperty(Options.EXPORT_FILE_DIR, ManagerTest.EXPORT_FILE_DIR);
System.setProperty(Options.COMMAND_FILE, commandFile.getAbsolutePath());
Runnable pause = () -> {
Expand Down Expand Up @@ -595,12 +595,12 @@ public void testCommandFileStop() {
exportFile.deleteOnExit();
File commandFile = new File(ManagerTest.EXPORT_FILE_DIR, Math.random() + EXT_TXT);
commandFile.deleteOnExit();
System.setProperty(Options.XCC_CONNECTION_URI, ManagerTest.XCC_CONNECTION_URI);
System.setProperty(XCC_CONNECTION_URI, ManagerTest.XCC_CONNECTION_URI);
System.setProperty(Options.URIS_FILE, ManagerTest.URIS_FILE);
System.setProperty(Options.THREAD_COUNT, Integer.toString(1));
System.setProperty(Options.PROCESS_MODULE, TRANSFORM_SLOW_MODULE);
System.setProperty(Options.PROCESS_TASK, ManagerTest.PROCESS_TASK);
System.setProperty(Options.EXPORT_FILE_NAME, ManagerTest.EXPORT_FILE_NAME);
System.setProperty(PROCESS_MODULE, TRANSFORM_SLOW_MODULE);
System.setProperty(PROCESS_TASK, ManagerTest.PROCESS_TASK);
System.setProperty(EXPORT_FILE_NAME, ManagerTest.EXPORT_FILE_NAME);
System.setProperty(Options.EXPORT_FILE_DIR, ManagerTest.EXPORT_FILE_DIR);
System.setProperty(Options.COMMAND_FILE, commandFile.getAbsolutePath());
Runnable stop = () -> {
Expand Down Expand Up @@ -639,12 +639,12 @@ public void testCommandFileLowerThreads() {
exportFile.deleteOnExit();
File commandFile = new File(ManagerTest.EXPORT_FILE_DIR, Math.random() + EXT_TXT);
commandFile.deleteOnExit();
System.setProperty(Options.XCC_CONNECTION_URI, ManagerTest.XCC_CONNECTION_URI);
System.setProperty(XCC_CONNECTION_URI, ManagerTest.XCC_CONNECTION_URI);
System.setProperty(Options.URIS_FILE, ManagerTest.URIS_FILE);
System.setProperty(Options.THREAD_COUNT, Integer.toString(3));
System.setProperty(Options.PROCESS_MODULE, TRANSFORM_SLOW_MODULE);
System.setProperty(Options.PROCESS_TASK, ManagerTest.PROCESS_TASK);
System.setProperty(Options.EXPORT_FILE_NAME, ManagerTest.EXPORT_FILE_NAME);
System.setProperty(PROCESS_MODULE, TRANSFORM_SLOW_MODULE);
System.setProperty(PROCESS_TASK, ManagerTest.PROCESS_TASK);
System.setProperty(EXPORT_FILE_NAME, ManagerTest.EXPORT_FILE_NAME);
System.setProperty(Options.EXPORT_FILE_DIR, ManagerTest.EXPORT_FILE_DIR);
System.setProperty(Options.COMMAND_FILE, commandFile.getAbsolutePath());

Expand Down

0 comments on commit d416ea6

Please sign in to comment.