diff --git a/.github/workflows/javadocTest.yml b/.github/workflows/javadocTest.yml index 8c5df5fa4..f66e8a7f9 100644 --- a/.github/workflows/javadocTest.yml +++ b/.github/workflows/javadocTest.yml @@ -28,4 +28,4 @@ jobs: restore-keys: ${{ runner.os }}-m2 - name: Build with Maven - run: mvn -B -Dmaven.test.skip=True clean install javadoc:javadoc + run: mvn -B clean install javadoc:javadoc diff --git a/dfsclient/src/test/java/org/hpccsystems/dfs/client/DFSBenchmarkTest.java b/dfsclient/src/test/java/org/hpccsystems/dfs/client/DFSBenchmarkTest.java index af6745708..0218581cb 100644 --- a/dfsclient/src/test/java/org/hpccsystems/dfs/client/DFSBenchmarkTest.java +++ b/dfsclient/src/test/java/org/hpccsystems/dfs/client/DFSBenchmarkTest.java @@ -25,12 +25,11 @@ import org.hpccsystems.dfs.client.HPCCRecord; import org.hpccsystems.dfs.client.HPCCRecordBuilder; import org.hpccsystems.dfs.client.HpccRemoteFileReader; +import org.hpccsystems.ws.client.BaseRemoteTest; import org.hpccsystems.dfs.client.DataPartition; import org.hpccsystems.commons.ecl.FieldDef; import org.hpccsystems.commons.errors.HpccFileException; -import org.hpccsystems.ws.client.platform.test.BaseRemoteTest; - import org.json.JSONObject; import org.json.JSONArray; @@ -86,7 +85,7 @@ public void readBenchmarks() throws Exception { System.out.println("Starting Raw Read Tests"); System.out.println("-------------------------------------------------------------"); - + MetricSumTransformer sumTransformer = new MetricSumTransformer(); MetricAverageTransformer aggregateTransformer = new MetricAverageTransformer(); ArrayList rawReadTests = new ArrayList(); @@ -128,7 +127,7 @@ public void readBenchmarks() throws Exception } avgdMetrics = aggregateTransformer.transform(avgdMetrics); result.addMetrics(avgdMetrics); - + // Calculate and add bandwidth IMetric readTimeMetric = result.getMetric(READ_TIME_METRIC); double avgReadTime = readTimeMetric.getValue() * Units.calculateScaleConversion(readTimeMetric.getUnits().scale,Units.Scale.UNIT); @@ -174,7 +173,7 @@ public void readBenchmarks() throws Exception metrics = sumTransformer.transform(metrics); metrics.add(new SimpleMetric((double)readTimeNS, READ_TIME_METRIC, new Units(Units.Type.SECONDS, Units.Scale.NANO))); - + avgdMetrics.addAll(metrics); } catch(Exception e) @@ -203,7 +202,7 @@ public void readBenchmarks() throws Exception // Output plugin results JSONArray testGroups = new JSONArray(); - + JSONObject rawReadGroup = new JSONObject(); rawReadGroup.put("name","Raw Read Tests"); @@ -230,7 +229,7 @@ public void readBenchmarks() throws Exception JSONObject output = new JSONObject(); output.put("groups",testGroups); - + String outputPath = "results.json"; FileWriter fileWriter = new FileWriter(outputPath); fileWriter.write(output.toString()); @@ -302,7 +301,7 @@ public void readRawFileData(HPCCFile file, List metrics) throws Excepti { bytesToRead = buffer.length; } - inputStream.read(buffer,0,bytesToRead); + inputStream.read(buffer,0,bytesToRead); try { @@ -322,7 +321,7 @@ public void readRawFileData(HPCCFile file, List metrics) throws Excepti hasMoreData = nextByte >= 0; } } - + metrics.addAll(inputStream.getMetrics()); inputStream.close(); } @@ -434,7 +433,7 @@ public int readFileInParallel(HPCCFile file, int numThreads) throws Exception Integer filePartRecordCount = 0; FieldDef recordDefinition = originalRD; public void run() - { + { HpccRemoteFileReader fileReader = null; try { @@ -459,14 +458,14 @@ public void run() { Assert.fail("Received null record during read"); } - + filePartRecordCount++; } - + recordCounts[filePartIndex] = filePartRecordCount; try { - fileReader.close(); + fileReader.close(); } catch (Exception e){} } diff --git a/dfsclient/src/test/java/org/hpccsystems/dfs/client/DFSHPCCFile.java b/dfsclient/src/test/java/org/hpccsystems/dfs/client/DFSHPCCFile.java index f1c97427d..4ca9177f0 100644 --- a/dfsclient/src/test/java/org/hpccsystems/dfs/client/DFSHPCCFile.java +++ b/dfsclient/src/test/java/org/hpccsystems/dfs/client/DFSHPCCFile.java @@ -7,7 +7,7 @@ import org.hpccsystems.commons.ecl.FileFilter; import org.hpccsystems.commons.errors.HpccFileException; import org.hpccsystems.dfs.cluster.RemapInfo; -import org.hpccsystems.ws.client.platform.test.BaseRemoteTest; +import org.hpccsystems.ws.client.BaseRemoteTest; import org.hpccsystems.ws.client.utils.Connection; import org.junit.AfterClass; import org.junit.Assert; diff --git a/dfsclient/src/test/java/org/hpccsystems/dfs/client/DFSIndexTest.java b/dfsclient/src/test/java/org/hpccsystems/dfs/client/DFSIndexTest.java index fc82df93c..9318dd297 100644 --- a/dfsclient/src/test/java/org/hpccsystems/dfs/client/DFSIndexTest.java +++ b/dfsclient/src/test/java/org/hpccsystems/dfs/client/DFSIndexTest.java @@ -27,9 +27,9 @@ import java.lang.StringBuilder; import java.lang.Math; +import org.hpccsystems.ws.client.BaseRemoteTest; import org.hpccsystems.ws.client.HPCCWsDFUClient; import org.hpccsystems.ws.client.HPCCWsWorkUnitsClient; -import org.hpccsystems.ws.client.platform.test.BaseRemoteTest; import org.hpccsystems.ws.client.utils.Connection; import org.hpccsystems.ws.client.wrappers.wsworkunits.WorkunitWrapper; import org.hpccsystems.ws.client.wrappers.wsdfu.DFUCreateFileWrapper; @@ -55,9 +55,8 @@ import static org.junit.Assert.assertTrue; @Category(org.hpccsystems.commons.annotations.RemoteTests.class) -public class DFSIndexTest extends BaseRemoteTest -{ - String[] datasetNames = {"~test::index::integer","~test::index::string"}; +public class DFSIndexTest extends BaseRemoteTest { + String[] datasetNames = { "~test::index::integer", "~test::index::string" }; FieldDef[] datasetRecordDefinitions = new FieldDef[2]; ArrayList partitionRangeStart = new ArrayList(); @@ -66,93 +65,86 @@ public class DFSIndexTest extends BaseRemoteTest static boolean isSetup = false; @Before - public void setup() throws Exception - { - if (isSetup) - { + public void setup() throws Exception { + if (isSetup) { return; } isSetup = true; // Integer key FieldDef[] fieldDefs = new FieldDef[2]; - fieldDefs[0] = new FieldDef("key", FieldType.INTEGER, "INTEGER4", 4, true, false, HpccSrcType.LITTLE_ENDIAN, new FieldDef[0]); - fieldDefs[1] = new FieldDef("payload", FieldType.STRING, "STRING16", 16, true, false, HpccSrcType.SINGLE_BYTE_CHAR, new FieldDef[0]); + fieldDefs[0] = new FieldDef("key", FieldType.INTEGER, "INTEGER4", 4, true, false, HpccSrcType.LITTLE_ENDIAN, + new FieldDef[0]); + fieldDefs[1] = new FieldDef("payload", FieldType.STRING, "STRING16", 16, true, false, + HpccSrcType.SINGLE_BYTE_CHAR, new FieldDef[0]); - datasetRecordDefinitions[0]= new FieldDef("RootRecord", FieldType.RECORD, "rec", 4, false, false, HpccSrcType.LITTLE_ENDIAN, fieldDefs); + datasetRecordDefinitions[0] = new FieldDef("RootRecord", FieldType.RECORD, "rec", 4, false, false, + HpccSrcType.LITTLE_ENDIAN, fieldDefs); // String key fieldDefs = new FieldDef[2]; - fieldDefs[0] = new FieldDef("key", FieldType.STRING, "STRING4", 4, true, false, HpccSrcType.SINGLE_BYTE_CHAR, new FieldDef[0]); - fieldDefs[1] = new FieldDef("payload", FieldType.STRING, "STRING16", 16, true, false, HpccSrcType.SINGLE_BYTE_CHAR, new FieldDef[0]); + fieldDefs[0] = new FieldDef("key", FieldType.STRING, "STRING4", 4, true, false, HpccSrcType.SINGLE_BYTE_CHAR, + new FieldDef[0]); + fieldDefs[1] = new FieldDef("payload", FieldType.STRING, "STRING16", 16, true, false, + HpccSrcType.SINGLE_BYTE_CHAR, new FieldDef[0]); - datasetRecordDefinitions[1]= new FieldDef("RootRecord", FieldType.RECORD, "rec", 4, false, false, HpccSrcType.LITTLE_ENDIAN, fieldDefs); + datasetRecordDefinitions[1] = new FieldDef("RootRecord", FieldType.RECORD, "rec", 4, false, false, + HpccSrcType.LITTLE_ENDIAN, fieldDefs); - for (int i = 0; i < datasetNames.length; i++) - { - //------------------------------------------------------------------------------ + for (int i = 0; i < datasetNames.length; i++) { + // ------------------------------------------------------------------------------ // Create indexable dataset - //------------------------------------------------------------------------------ + // ------------------------------------------------------------------------------ String datasetName = datasetNames[i]; FieldDef recordDef = datasetRecordDefinitions[i]; createIndexableFile(datasetName, recordDef, partitionRangeStart, partitionRangeEnd); - //------------------------------------------------------------------------------ + // ------------------------------------------------------------------------------ // Create index - //------------------------------------------------------------------------------ + // ------------------------------------------------------------------------------ String indexName = null; - try - { - indexName = createIndexOnDataset(datasetName,recordDef); - } - catch (Exception e) - { + try { + indexName = createIndexOnDataset(datasetName, recordDef); + } catch (Exception e) { Assume.assumeNoException("Failed to create index with error: ", e); } } } @Test - public void hpccTLKFilterTest() throws Exception - { - for (int i = 0; i < datasetNames.length; i++) - { + public void hpccTLKFilterTest() throws Exception { + for (int i = 0; i < datasetNames.length; i++) { String datasetName = datasetNames[i]; FieldDef recordDef = datasetRecordDefinitions[i]; String indexName = datasetName + "::key"; - //------------------------------------------------------------------------------ + // ------------------------------------------------------------------------------ // Read index and check TLK against known partition ranges - //------------------------------------------------------------------------------ + // ------------------------------------------------------------------------------ - HPCCFile file = new HPCCFile(indexName, connString , hpccUser, hpccPass); + HPCCFile file = new HPCCFile(indexName, connString, hpccUser, hpccPass); assertTrue(file.isTlkIndex()); DataPartition[] fileParts = file.getFileParts(); FieldDef originalRD = file.getRecordDefinition(); - for (int j = 0; j < fileParts.length-1; j++) - { + for (int j = 0; j < fileParts.length - 1; j++) { HPCCRecordBuilder recordBuilder = new HPCCRecordBuilder(file.getProjectedRecordDefinition()); - HpccRemoteFileReader fileReader = new HpccRemoteFileReader(fileParts[j], originalRD, recordBuilder); - while (fileReader.hasNext()) - { + HpccRemoteFileReader fileReader = new HpccRemoteFileReader(fileParts[j], + originalRD, recordBuilder); + while (fileReader.hasNext()) { HPCCRecord record = fileReader.next(); - if (record == null) - { + if (record == null) { Assert.fail("PartitionProcessor: " + j + " failed to read record."); } // Check starting range String filterStr = null; - if (record.getField(0) instanceof String) - { + if (record.getField(0) instanceof String) { filterStr = "key = \'" + record.getField(0).toString() + "\'"; - } - else - { + } else { filterStr = "key = " + record.getField(0).toString(); } @@ -161,19 +153,17 @@ public void hpccTLKFilterTest() throws Exception // Due to how TLK works we can get more that one partition boolean hadExpectedPartition = false; - for (int k = 0; k < matchedPartitions.size(); k++) - { - if (matchedPartitions.get(k).index() == j) - { + for (int k = 0; k < matchedPartitions.size(); k++) { + if (matchedPartitions.get(k).index() == j) { hadExpectedPartition = true; break; } } - if (hadExpectedPartition == false) - { + if (hadExpectedPartition == false) { System.out.println("Partition: " + j + " Filter: " + filterStr); - System.out.println("Partition range: " + file.getPartitionProcessor().getPartitionRangeAsString(j)); + System.out.println( + "Partition range: " + file.getPartitionProcessor().getPartitionRangeAsString(j)); Assert.fail("PartitionProcessor: " + j + " filtering result did not contain partition" + partitionListToString(matchedPartitions)); @@ -184,14 +174,13 @@ public void hpccTLKFilterTest() throws Exception } @Test - public void tlkFilterExample() throws Exception - { + public void tlkFilterExample() throws Exception { System.out.println("Starting tlk filter test."); - //------------------------------------------------------------------------------ + // ------------------------------------------------------------------------------ // Read index and check TLK against known partition ranges - //------------------------------------------------------------------------------ + // ------------------------------------------------------------------------------ - HPCCFile file = new HPCCFile("~test::index::integer::key", connString , hpccUser, hpccPass); + HPCCFile file = new HPCCFile("~test::index::integer::key", connString, hpccUser, hpccPass); // Find partitions that match the provided filter Long searchValue = 3L; @@ -202,20 +191,18 @@ public void tlkFilterExample() throws Exception DataPartition matchedPart = filteredPartitions.get(0); HPCCRecordBuilder recordBuilder = new HPCCRecordBuilder(file.getProjectedRecordDefinition()); - HpccRemoteFileReader fileReader = new HpccRemoteFileReader(matchedPart, file.getRecordDefinition(), recordBuilder); + HpccRemoteFileReader fileReader = new HpccRemoteFileReader(matchedPart, + file.getRecordDefinition(), recordBuilder); boolean foundRecord = false; - while (fileReader.hasNext()) - { + while (fileReader.hasNext()) { HPCCRecord record = fileReader.next(); - if (record == null) - { + if (record == null) { Assert.fail("Received null record during read"); } Long keyValue = (Long) record.getField(0); - if (keyValue.equals(searchValue)) - { + if (keyValue.equals(searchValue)) { foundRecord = true; } System.out.println("Key: " + keyValue + " Search value: " + searchValue + " found: " + foundRecord); @@ -224,13 +211,12 @@ public void tlkFilterExample() throws Exception } @Test - public void tlkBypassTest() throws Exception - { - //------------------------------------------------------------------------------ + public void tlkBypassTest() throws Exception { + // ------------------------------------------------------------------------------ // Read index ignoring TLK and check that all partitions are returned - //------------------------------------------------------------------------------ + // ------------------------------------------------------------------------------ - HPCCFile file = new HPCCFile("~test::index::integer::key", connString , hpccUser, hpccPass); + HPCCFile file = new HPCCFile("~test::index::integer::key", connString, hpccUser, hpccPass); file.setUseTLK(false); DataPartition[] dataParts = file.getFileParts(); @@ -243,20 +229,18 @@ public void tlkBypassTest() throws Exception } @Test - public void biasedIntTest() throws Exception - { - HPCCFile file = new HPCCFile("~test::index::integer::key", connString , hpccUser, hpccPass); + public void biasedIntTest() throws Exception { + HPCCFile file = new HPCCFile("~test::index::integer::key", connString, hpccUser, hpccPass); DataPartition[] fileParts = file.getFileParts(); List records = new ArrayList(); FieldDef originalRD = file.getRecordDefinition(); - for (int j = 0; j < fileParts.length; j++) - { + for (int j = 0; j < fileParts.length; j++) { HPCCRecordBuilder recordBuilder = new HPCCRecordBuilder(file.getProjectedRecordDefinition()); - HpccRemoteFileReader fileReader = new HpccRemoteFileReader(fileParts[j], originalRD, recordBuilder); - while (fileReader.hasNext()) - { + HpccRemoteFileReader fileReader = new HpccRemoteFileReader(fileParts[j], originalRD, + recordBuilder); + while (fileReader.hasNext()) { records.add(fileReader.next()); } fileReader.close(); @@ -264,7 +248,8 @@ public void biasedIntTest() throws Exception assertTrue(records.size() >= 2); - // Read the data from the first partition and make sure that biased integers have been corrected + // Read the data from the first partition and make sure that biased integers + // have been corrected int partitionIndex = 0; { HPCCRecord startRecord = records.get(0); @@ -279,11 +264,9 @@ public void biasedIntTest() throws Exception } } - private String partitionListToString(List partitions) - { + private String partitionListToString(List partitions) { String matchedPartitionStr = "[ "; - for (DataPartition part : partitions) - { + for (DataPartition part : partitions) { matchedPartitionStr += part.index() + " "; } matchedPartitionStr += "]"; @@ -291,41 +274,41 @@ private String partitionListToString(List partitions) return matchedPartitionStr; } - private void createIndexableFile(String fileName, FieldDef recordDef, List partitionRangeStart, List partitionRangeEnd) - { - try - { - //------------------------------------------------------------------------------ - // Request a temp file be created in HPCC to write to - //------------------------------------------------------------------------------ + private void createIndexableFile(String fileName, FieldDef recordDef, List partitionRangeStart, + List partitionRangeEnd) { + try { + // ------------------------------------------------------------------------------ + // Request a temp file be created in HPCC to write to + // ------------------------------------------------------------------------------ String eclRecordDefn = RecordDefinitionTranslator.toECLRecord(recordDef); HPCCWsDFUClient dfuClient = wsclient.getWsDFUClient(); String filegroupname = this.thorClusterFileGroup; - DFUCreateFileWrapper createResult = dfuClient.createFile(fileName, filegroupname, eclRecordDefn, 300, false, DFUFileTypeWrapper.Flat, ""); + DFUCreateFileWrapper createResult = dfuClient.createFile(fileName, filegroupname, eclRecordDefn, 300, false, + DFUFileTypeWrapper.Flat, ""); DFUFilePartWrapper[] dfuFileParts = createResult.getFileParts(); DataPartition[] hpccPartitions = DataPartition.createPartitions(dfuFileParts, - new NullRemapper(new RemapInfo(), createResult.getFileAccessInfo()), dfuFileParts.length, createResult.getFileAccessInfoBlob()); + new NullRemapper(new RemapInfo(), createResult.getFileAccessInfo()), dfuFileParts.length, + createResult.getFileAccessInfoBlob()); - //------------------------------------------------------------------------------ - // Write partitions to file parts and keep track of record ranges - //------------------------------------------------------------------------------ + // ------------------------------------------------------------------------------ + // Write partitions to file parts and keep track of record ranges + // ------------------------------------------------------------------------------ partitionRangeStart.clear(); partitionRangeEnd.clear(); long bytesWritten = 0; int numRecords = 0; - for (int partitionIndex = 0; partitionIndex < hpccPartitions.length; partitionIndex++) - { + for (int partitionIndex = 0; partitionIndex < hpccPartitions.length; partitionIndex++) { HPCCRecordAccessor recordAccessor = new HPCCRecordAccessor(recordDef); - HPCCRemoteFileWriter fileWriter = new HPCCRemoteFileWriter(hpccPartitions[partitionIndex], recordDef, recordAccessor, CompressionAlgorithm.NONE); + HPCCRemoteFileWriter fileWriter = new HPCCRemoteFileWriter( + hpccPartitions[partitionIndex], recordDef, recordAccessor, CompressionAlgorithm.NONE); - try - { + try { List recordRange = createRecordRange(partitionIndex, hpccPartitions.length, recordDef); for (HPCCRecord record : recordRange) { fileWriter.writeRecord(record); @@ -337,22 +320,18 @@ private void createIndexableFile(String fileName, FieldDef recordDef, List records = new ArrayList(); - for (long i = 0; i < fileParts.length; i++) - { + for (long i = 0; i < fileParts.length; i++) { long start = System.currentTimeMillis(); HpccRandomAccessFileReader fileReader = null; - try - { - DataPartition fp = fileParts[(int)i]; + try { + DataPartition fp = fileParts[(int) i]; HPCCRecordBuilder recordBuilder = new HPCCRecordBuilder(file.getProjectedRecordDefinition()); - fileReader = new HpccRandomAccessFileReader(fp, originalRD, recordBuilder,-1); - } - catch (Exception e) - { + fileReader = new HpccRandomAccessFileReader(fp, originalRD, recordBuilder, -1); + } catch (Exception e) { Assert.fail("Error: " + e.getMessage()); } long end = System.currentTimeMillis(); System.out.println("Time to create batch record reader: " + (end - start) + "ms"); start = System.currentTimeMillis(); - Long[] recOffsets = {20L}; + Long[] recOffsets = { 20L }; fileReader.addRecordRequests(Arrays.asList(recOffsets)); - while (fileReader.hasNext()) - { + while (fileReader.hasNext()) { HPCCRecord record = fileReader.next(); - if (record == null) - { + if (record == null) { Assert.fail("Error: failed to read record."); } long expectedKeyValue = 3 + 4 * i; Long keyValue = (Long) record.getField(0); - if (keyValue != expectedKeyValue) - { + if (keyValue != expectedKeyValue) { Assert.fail("Error: key values did not match."); } } @@ -428,80 +398,64 @@ public void testBatchRandomAccess() throws Exception fileReader.close(); } - } - catch (Exception e) - { + } catch (Exception e) { System.out.println("Error: " + e.getMessage()); } } - List createRecordRange(int partitionIndex, int numPartitions, FieldDef recordDef) - { + List createRecordRange(int partitionIndex, int numPartitions, FieldDef recordDef) { Object[] rangeStartFields = new Object[recordDef.getNumDefs()]; Object[] rangeEndFields = new Object[recordDef.getNumDefs()]; - for (int i = 0; i < recordDef.getNumDefs(); i++) - { + for (int i = 0; i < recordDef.getNumDefs(); i++) { boolean isKeyField = (i == 0); boolean isStart = true; - rangeStartFields[i] = createFieldValue(partitionIndex, numPartitions, recordDef.getDef(i), isKeyField, isStart); + rangeStartFields[i] = createFieldValue(partitionIndex, numPartitions, recordDef.getDef(i), isKeyField, + isStart); isStart = false; - rangeEndFields[i] = createFieldValue(partitionIndex, numPartitions, recordDef.getDef(i),isKeyField, isStart); + rangeEndFields[i] = createFieldValue(partitionIndex, numPartitions, recordDef.getDef(i), isKeyField, + isStart); } ArrayList recordRange = new ArrayList(); - recordRange.add(new HPCCRecord(rangeStartFields,recordDef)); - recordRange.add(new HPCCRecord(rangeEndFields,recordDef)); + recordRange.add(new HPCCRecord(rangeStartFields, recordDef)); + recordRange.add(new HPCCRecord(rangeEndFields, recordDef)); return recordRange; } - Object createFieldValue(int partitionIndex, int numPartitions, FieldDef fd, boolean isKeyField, boolean isStart) - { - if (isKeyField) - { - if (fd.isFixed() == false) - { + Object createFieldValue(int partitionIndex, int numPartitions, FieldDef fd, boolean isKeyField, boolean isStart) { + if (isKeyField) { + if (fd.isFixed() == false) { Assert.fail("Invalid key field type"); } - switch (fd.getFieldType()) - { - case BOOLEAN: - { + switch (fd.getFieldType()) { + case BOOLEAN: { return Boolean.valueOf(isStart == false); } - case INTEGER: - { - if (isStart) - { - return new Integer(partitionIndex*4); - } - else - { - return new Integer(partitionIndex*4+3); + case INTEGER: { + if (isStart) { + return new Integer(partitionIndex * 4); + } else { + return new Integer(partitionIndex * 4 + 3); } } - case STRING: - { + case STRING: { // Convert partitionIndex * 4 + 0/3 into base 26 string int rangeNum = 0; - if (isStart) - { + if (isStart) { rangeNum = partitionIndex * 4; - } - else - { + } else { rangeNum = partitionIndex * 4 + 3; } StringBuilder builder = new StringBuilder(" "); int charIndex = (int) Math.ceil(Math.log(numPartitions) / Math.log(26)); - while (rangeNum > 0) - { + while (rangeNum > 0) { char currentLetter = (char) ('A' + (rangeNum % 26)); - builder.setCharAt(charIndex,currentLetter); + builder.setCharAt(charIndex, currentLetter); rangeNum /= 26; charIndex--; @@ -513,11 +467,8 @@ Object createFieldValue(int partitionIndex, int numPartitions, FieldDef fd, bool Assert.fail("Invalid key field type"); return null; } - } - else - { - if (fd.getFieldType() != FieldType.STRING) - { + } else { + if (fd.getFieldType() != FieldType.STRING) { Assert.fail("Invalid payload field type."); return null; } @@ -526,12 +477,12 @@ Object createFieldValue(int partitionIndex, int numPartitions, FieldDef fd, bool } } - public static void main(String[] args) - { + public static void main(String[] args) { DFSIndexTest test = new DFSIndexTest(); try { test.hpccTLKFilterTest(); test.tlkFilterExample(); - } catch(Exception e) {} + } catch (Exception e) { + } } } diff --git a/dfsclient/src/test/java/org/hpccsystems/dfs/client/DFSReadWriteTest.java b/dfsclient/src/test/java/org/hpccsystems/dfs/client/DFSReadWriteTest.java index 44252cbdd..6d2720405 100644 --- a/dfsclient/src/test/java/org/hpccsystems/dfs/client/DFSReadWriteTest.java +++ b/dfsclient/src/test/java/org/hpccsystems/dfs/client/DFSReadWriteTest.java @@ -39,11 +39,11 @@ import org.hpccsystems.commons.ecl.RecordDefinitionTranslator; import org.hpccsystems.commons.errors.HpccFileException; import org.hpccsystems.commons.utils.Utils; +import org.hpccsystems.ws.client.BaseRemoteTest; import org.hpccsystems.ws.client.HPCCWsDFUClient; import org.hpccsystems.ws.client.HPCCWsWorkUnitsClient; import org.hpccsystems.ws.client.platform.Version; import org.hpccsystems.ws.client.wrappers.wsworkunits.WorkunitWrapper; -import org.hpccsystems.ws.client.platform.test.BaseRemoteTest; import org.hpccsystems.ws.client.wrappers.wsdfu.DFUCreateFileWrapper; import org.hpccsystems.ws.client.wrappers.wsdfu.DFUFileDetailWrapper; import org.hpccsystems.ws.client.wrappers.wsdfu.DFUFilePartWrapper; diff --git a/dfsclient/src/test/java/org/hpccsystems/dfs/client/FileUtilityTest.java b/dfsclient/src/test/java/org/hpccsystems/dfs/client/FileUtilityTest.java index e89b87483..f62c3d39a 100644 --- a/dfsclient/src/test/java/org/hpccsystems/dfs/client/FileUtilityTest.java +++ b/dfsclient/src/test/java/org/hpccsystems/dfs/client/FileUtilityTest.java @@ -21,7 +21,7 @@ import java.io.File; import org.hpccsystems.dfs.client.FileUtility; -import org.hpccsystems.ws.client.platform.test.BaseRemoteTest; +import org.hpccsystems.ws.client.BaseRemoteTest; import org.json.JSONArray; import org.json.JSONObject; import org.junit.Assert; diff --git a/wsclient/src/main/java/org/hpccsystems/ws/client/platform/test/BaseRemoteTest.java b/wsclient/src/test/java/org/hpccsystems/ws/client/BaseRemoteTest.java similarity index 77% rename from wsclient/src/main/java/org/hpccsystems/ws/client/platform/test/BaseRemoteTest.java rename to wsclient/src/test/java/org/hpccsystems/ws/client/BaseRemoteTest.java index 148005052..402e2782d 100644 --- a/wsclient/src/main/java/org/hpccsystems/ws/client/platform/test/BaseRemoteTest.java +++ b/wsclient/src/test/java/org/hpccsystems/ws/client/BaseRemoteTest.java @@ -15,11 +15,13 @@ HPCC SYSTEMS software Copyright (C) 2019 HPCC Systems®. limitations under the License. ############################################################################## */ -package org.hpccsystems.ws.client.platform.test; +package org.hpccsystems.ws.client; import static org.junit.Assert.assertTrue; import static org.junit.Assert.fail; +import java.io.ByteArrayOutputStream; +import java.io.InputStream; import java.net.InetAddress; import java.net.MalformedURLException; import java.net.UnknownHostException; @@ -69,49 +71,6 @@ public abstract class BaseRemoteTest protected final static String sockTO = System.getProperty("sockettimeoutmillis"); protected final static int testThreadCount = Integer.parseInt(System.getProperty("testthreadcount", "10")); - - /* - Code used to generate HPCC file - unique_keys := 100000; // Should be less than number of records - unique_values := 10212; // Should be less than number of records - dataset_name := '~benchmark::all_types::200KB'; - totalrecs := 779449/500; - - childRec := {STRING8 childField1, INTEGER8 childField2, REAL8 childField3}; - - rec := { INTEGER8 int8, UNSIGNED8 uint8, INTEGER4 int4, UNSIGNED4 uint4, - INTEGER2 int2, UNSIGNED2 uint2, REAL8 r8, REAL4 r4, - DECIMAL16_8 dec16, UDECIMAL16_8 udec16, QSTRING qStr, - STRING8 fixStr8, STRING str, VARSTRING varStr, VARSTRING varStr8, - UTF8 utfStr, UNICODE8 uni8, UNICODE uni, VARUNICODE varUni, - DATASET(childRec) childDataset, SET OF INTEGER1 int1Set - }; - - ds := DATASET(totalrecs, transform(rec, - self.int8 := (INTEGER)(random() % unique_keys); - self.uint8 := (INTEGER)(random() % unique_values); - self.int4 := (INTEGER)(random() % unique_values); - self.uint4 := (INTEGER)(random() % unique_values); - self.int2 := (INTEGER)(random() % unique_values); - self.uint2 := (INTEGER)(random() % unique_values); - self.r8 := (REAL)(random() % unique_values); - self.r4 := (REAL)(random() % unique_values); - self.dec16 := (REAL)(random() % unique_values); - self.udec16 := (REAL)(random() % unique_values); - self.qStr := (STRING)(random() % unique_values); - self.fixStr8 := (STRING)(random() % unique_values); - self.str := (STRING)(random() % unique_values); - self.varStr := (STRING)(random() % unique_values); - self.varStr8 := (STRING)(random() % unique_values); - self.utfStr := (STRING)(random() % unique_values); - self.uni8 := (STRING)(random() % unique_values); - self.uni := (STRING)(random() % unique_values); - self.varUni := (STRING)(random() % unique_values); - self.childDataset := DATASET([{'field1',2,3},{'field1',2,3}],childRec); - self.int1Set := [1,2,3]; - ), DISTRIBUTED); - OUTPUT(ds,,dataset_name,overwrite); - */ public static final String DEFAULTHPCCFILENAME = "benchmark::all_types::200kb"; /* @@ -259,15 +218,17 @@ public boolean verify(String hostname,javax.net.ssl.SSLSession sslSession) public static String executeECLScript(String eclFile) throws Exception { - URL eclFileURL = BaseRemoteTest.class.getClassLoader().getResource(eclFile); - if (eclFileURL == null) - { - return null; + InputStream resourceStream = BaseRemoteTest.class.getClassLoader().getResourceAsStream(eclFile); + ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream(); + + byte[] buffer = new byte[4096]; + int bytesRead = resourceStream.read(buffer); + while (bytesRead > -1) { + byteArrayOutputStream.write(buffer, 0, bytesRead); + bytesRead = resourceStream.read(buffer); } - Path eclFilePath = Paths.get(eclFileURL.toURI()); - - byte[] eclData = Files.readAllBytes(eclFilePath); + byte[] eclData = byteArrayOutputStream.toByteArray(); String ecl = new String(eclData, "UTF-8"); WorkunitWrapper wu = new WorkunitWrapper(); diff --git a/wsclient/src/test/java/org/hpccsystems/ws/client/BaseWsAttributesClientIntegrationTest.java b/wsclient/src/test/java/org/hpccsystems/ws/client/BaseWsAttributesClientIntegrationTest.java index 9083a8213..9ed5db4a9 100644 --- a/wsclient/src/test/java/org/hpccsystems/ws/client/BaseWsAttributesClientIntegrationTest.java +++ b/wsclient/src/test/java/org/hpccsystems/ws/client/BaseWsAttributesClientIntegrationTest.java @@ -10,7 +10,6 @@ import org.apache.commons.io.FilenameUtils; import org.hpccsystems.ws.client.extended.HPCCWsAttributesClient; import org.hpccsystems.ws.client.platform.Cluster; -import org.hpccsystems.ws.client.platform.test.BaseRemoteTest; import org.hpccsystems.ws.client.wrappers.ArrayOfEspExceptionWrapper; import org.hpccsystems.ws.client.wrappers.ECLAttributeWrapper; import org.junit.Before; diff --git a/wsclient/src/test/java/org/hpccsystems/ws/client/BaseWsWorkunitsClientIntegrationTest.java b/wsclient/src/test/java/org/hpccsystems/ws/client/BaseWsWorkunitsClientIntegrationTest.java index d5c7944bd..8144e0586 100644 --- a/wsclient/src/test/java/org/hpccsystems/ws/client/BaseWsWorkunitsClientIntegrationTest.java +++ b/wsclient/src/test/java/org/hpccsystems/ws/client/BaseWsWorkunitsClientIntegrationTest.java @@ -5,7 +5,6 @@ import org.hpccsystems.ws.client.platform.Cluster; import org.hpccsystems.ws.client.platform.QuerySetFilterType; -import org.hpccsystems.ws.client.platform.test.BaseRemoteTest; import org.hpccsystems.ws.client.wrappers.ApplicationValueWrapper; import org.hpccsystems.ws.client.wrappers.ArrayOfECLExceptionWrapper; import org.hpccsystems.ws.client.wrappers.ArrayOfEspExceptionWrapper; diff --git a/wsclient/src/test/java/org/hpccsystems/ws/client/FileSprayClientTest.java b/wsclient/src/test/java/org/hpccsystems/ws/client/FileSprayClientTest.java index efe4a5a77..9b6628878 100644 --- a/wsclient/src/test/java/org/hpccsystems/ws/client/FileSprayClientTest.java +++ b/wsclient/src/test/java/org/hpccsystems/ws/client/FileSprayClientTest.java @@ -14,7 +14,6 @@ import java.util.List; import org.apache.axis2.AxisFault; -import org.hpccsystems.ws.client.platform.test.BaseRemoteTest; import org.hpccsystems.ws.client.utils.Connection; import org.hpccsystems.ws.client.utils.Utils; import org.hpccsystems.ws.client.wrappers.ArrayOfBaseExceptionWrapper; diff --git a/wsclient/src/test/java/org/hpccsystems/ws/client/TestResultNotifier.java b/wsclient/src/test/java/org/hpccsystems/ws/client/TestResultNotifier.java new file mode 100644 index 000000000..bcff5a5c6 --- /dev/null +++ b/wsclient/src/test/java/org/hpccsystems/ws/client/TestResultNotifier.java @@ -0,0 +1,65 @@ +/*############################################################################## + + HPCC SYSTEMS software Copyright (C) 2023 HPCC Systems®. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +############################################################################## */ + +package org.hpccsystems.ws.client; + +import org.junit.runner.Description; +import org.junit.runner.notification.Failure; +import org.junit.runner.notification.RunListener; + +import java.io.FileWriter; +import java.io.IOException; +import java.io.PrintWriter; + +public class TestResultNotifier extends RunListener +{ + PrintWriter failedTestsFile = null; + + public void testFailure(Failure failure) throws Exception + { + synchronized (this) + { + if (failedTestsFile == null) + { + try + { + failedTestsFile = new PrintWriter( new FileWriter("./FailedTests.csv")); + } + catch (IOException e) + { + System.out.println("Failed to open FailedTests file with error: " + e.getMessage() + " redirecting output to System.out"); + failedTestsFile = new PrintWriter(System.out); + } + } + + Description description = failure.getDescription(); + failedTestsFile.println(description.getClassName() + "," + description.getMethodName() + "," + failure.getMessage()); + failedTestsFile.flush(); + } + } + + protected void finalize() throws Throwable + { + synchronized (this) + { + if (failedTestsFile != null) + { + failedTestsFile.close(); + } + } + } +} \ No newline at end of file diff --git a/wsclient/src/test/java/org/hpccsystems/ws/client/WSCloudClientTest.java b/wsclient/src/test/java/org/hpccsystems/ws/client/WSCloudClientTest.java index 453c73365..da4e0c7af 100644 --- a/wsclient/src/test/java/org/hpccsystems/ws/client/WSCloudClientTest.java +++ b/wsclient/src/test/java/org/hpccsystems/ws/client/WSCloudClientTest.java @@ -20,7 +20,6 @@ HPCC SYSTEMS software Copyright (C) 2022 HPCC Systems®. import static org.junit.Assume.assumeTrue; -import org.hpccsystems.ws.client.platform.test.BaseRemoteTest; import org.json.JSONArray; import org.json.JSONObject; import org.junit.Assert; diff --git a/wsclient/src/test/java/org/hpccsystems/ws/client/WSCodeSignClientTest.java b/wsclient/src/test/java/org/hpccsystems/ws/client/WSCodeSignClientTest.java index 36787f2f6..8965f3ec3 100644 --- a/wsclient/src/test/java/org/hpccsystems/ws/client/WSCodeSignClientTest.java +++ b/wsclient/src/test/java/org/hpccsystems/ws/client/WSCodeSignClientTest.java @@ -22,7 +22,6 @@ HPCC SYSTEMS software Copyright (C) 2021 HPCC Systems®. import java.util.List; import org.apache.axis2.AxisFault; -import org.hpccsystems.ws.client.platform.test.BaseRemoteTest; import org.hpccsystems.ws.client.wrappers.ArrayOfEspExceptionWrapper; import org.hpccsystems.ws.client.wrappers.gen.wscodesign.ListUserIDsRequestWrapper; import org.hpccsystems.ws.client.wrappers.gen.wscodesign.ListUserIDsResponseWrapper; diff --git a/wsclient/src/test/java/org/hpccsystems/ws/client/WSFileIOClientTest.java b/wsclient/src/test/java/org/hpccsystems/ws/client/WSFileIOClientTest.java index d2494eca0..158538608 100644 --- a/wsclient/src/test/java/org/hpccsystems/ws/client/WSFileIOClientTest.java +++ b/wsclient/src/test/java/org/hpccsystems/ws/client/WSFileIOClientTest.java @@ -25,7 +25,6 @@ HPCC SYSTEMS software Copyright (C) 2019 HPCC Systems®. import java.util.Set; import org.apache.axis2.AxisFault; -import org.hpccsystems.ws.client.platform.test.BaseRemoteTest; import org.hpccsystems.ws.client.utils.DelimitedDataOptions; import org.hpccsystems.ws.client.wrappers.ArrayOfEspExceptionWrapper; import org.hpccsystems.ws.client.wrappers.gen.filespray.ProgressResponseWrapper; diff --git a/wsclient/src/test/java/org/hpccsystems/ws/client/WSPackageProcessTest.java b/wsclient/src/test/java/org/hpccsystems/ws/client/WSPackageProcessTest.java index 36d130e4e..96849eea1 100644 --- a/wsclient/src/test/java/org/hpccsystems/ws/client/WSPackageProcessTest.java +++ b/wsclient/src/test/java/org/hpccsystems/ws/client/WSPackageProcessTest.java @@ -26,7 +26,6 @@ HPCC SYSTEMS software Copyright (C) 2019 HPCC Systems®. import org.apache.axis2.AxisFault; import org.hpccsystems.ws.client.gen.axis2.wspackageprocess.latest.AddPackageResponse; import org.hpccsystems.ws.client.gen.axis2.wspackageprocess.latest.DeletePackageResponse; -import org.hpccsystems.ws.client.platform.test.BaseRemoteTest; import org.hpccsystems.ws.client.wrappers.gen.wspackageprocess.AddPackageRequestWrapper; import org.hpccsystems.ws.client.wrappers.gen.wspackageprocess.BasePackageStatusWrapper; import org.hpccsystems.ws.client.wrappers.gen.wspackageprocess.DeletePackageRequestWrapper; diff --git a/wsclient/src/test/java/org/hpccsystems/ws/client/WSResroucesClientTest.java b/wsclient/src/test/java/org/hpccsystems/ws/client/WSResroucesClientTest.java index f28ae6024..865d41dc0 100644 --- a/wsclient/src/test/java/org/hpccsystems/ws/client/WSResroucesClientTest.java +++ b/wsclient/src/test/java/org/hpccsystems/ws/client/WSResroucesClientTest.java @@ -22,7 +22,6 @@ HPCC SYSTEMS software Copyright (C) 2021 HPCC Systems®. import java.util.List; import org.apache.axis2.AxisFault; -import org.hpccsystems.ws.client.platform.test.BaseRemoteTest; import org.hpccsystems.ws.client.wrappers.ArrayOfEspExceptionWrapper; import org.hpccsystems.ws.client.wrappers.gen.wsresources.HPCCServiceWrapper; import org.hpccsystems.ws.client.wrappers.gen.wsresources.ServiceQueryRequestWrapper; diff --git a/wsclient/src/test/java/org/hpccsystems/ws/client/WSSQLClientTest.java b/wsclient/src/test/java/org/hpccsystems/ws/client/WSSQLClientTest.java index 6d51a789b..d2a37f1fd 100644 --- a/wsclient/src/test/java/org/hpccsystems/ws/client/WSSQLClientTest.java +++ b/wsclient/src/test/java/org/hpccsystems/ws/client/WSSQLClientTest.java @@ -25,7 +25,6 @@ HPCC SYSTEMS software Copyright (C) 2019 HPCC Systems®. import org.apache.axis2.AxisFault; import org.hpccsystems.ws.client.platform.Version; -import org.hpccsystems.ws.client.platform.test.BaseRemoteTest; import org.hpccsystems.ws.client.utils.Connection; import org.hpccsystems.ws.client.wrappers.ArrayOfEspExceptionWrapper; import org.hpccsystems.ws.client.wrappers.gen.wssql.ECLWorkunitWrapper; diff --git a/wsclient/src/test/java/org/hpccsystems/ws/client/WSStoreClientTest.java b/wsclient/src/test/java/org/hpccsystems/ws/client/WSStoreClientTest.java index ae6e4019a..d6aeba052 100644 --- a/wsclient/src/test/java/org/hpccsystems/ws/client/WSStoreClientTest.java +++ b/wsclient/src/test/java/org/hpccsystems/ws/client/WSStoreClientTest.java @@ -29,7 +29,6 @@ HPCC SYSTEMS software Copyright (C) 2019 HPCC Systems®. import org.apache.axis2.AxisFault; import org.hpccsystems.commons.utils.CryptoHelper; import org.hpccsystems.commons.utils.DigestAlgorithmType; -import org.hpccsystems.ws.client.platform.test.BaseRemoteTest; import org.hpccsystems.ws.client.wrappers.ArrayOfEspExceptionWrapper; import org.junit.Assert; import org.junit.FixMethodOrder; @@ -53,7 +52,7 @@ public class WSStoreClientTest extends BaseRemoteTest if (System.getProperty("storenamespace") == null) System.out.println("'storenamespace' not provided, defaulting to: '" + defaultNS + "'"); - + client = HPCCWsStoreClient.get(connection); Assert.assertNotNull(client); } diff --git a/wsclient/src/test/java/org/hpccsystems/ws/client/WSTopologyClientTest.java b/wsclient/src/test/java/org/hpccsystems/ws/client/WSTopologyClientTest.java index 1d29bfafa..fdab4478b 100644 --- a/wsclient/src/test/java/org/hpccsystems/ws/client/WSTopologyClientTest.java +++ b/wsclient/src/test/java/org/hpccsystems/ws/client/WSTopologyClientTest.java @@ -24,7 +24,6 @@ HPCC SYSTEMS software Copyright (C) 2019 HPCC Systems®. import org.apache.axis2.AxisFault; import org.hpccsystems.ws.client.HPCCWsTopologyClient.TopologyGroupQueryKind; -import org.hpccsystems.ws.client.platform.test.BaseRemoteTest; import org.hpccsystems.ws.client.utils.HpccContainerizedUnsupportedException; import org.hpccsystems.ws.client.wrappers.ArrayOfEspExceptionWrapper; import org.hpccsystems.ws.client.wrappers.gen.wstopology.TpClusterInfoResponseWrapper; diff --git a/wsclient/src/test/java/org/hpccsystems/ws/client/WSWorkunitsTest.java b/wsclient/src/test/java/org/hpccsystems/ws/client/WSWorkunitsTest.java index 38a3d0593..deb12aca5 100644 --- a/wsclient/src/test/java/org/hpccsystems/ws/client/WSWorkunitsTest.java +++ b/wsclient/src/test/java/org/hpccsystems/ws/client/WSWorkunitsTest.java @@ -26,7 +26,6 @@ HPCC SYSTEMS software Copyright (C) 2019 HPCC Systems®. import java.util.concurrent.Callable; import org.apache.axis2.AxisFault; -import org.hpccsystems.ws.client.platform.test.BaseRemoteTest; import org.hpccsystems.ws.client.wrappers.ArrayOfECLExceptionWrapper; import org.hpccsystems.ws.client.wrappers.ArrayOfEspExceptionWrapper; import org.hpccsystems.ws.client.wrappers.gen.wsworkunits.WURunResponseWrapper; diff --git a/wsclient/src/test/java/org/hpccsystems/ws/client/WUQueryTest.java b/wsclient/src/test/java/org/hpccsystems/ws/client/WUQueryTest.java index e6275c320..a320260ee 100644 --- a/wsclient/src/test/java/org/hpccsystems/ws/client/WUQueryTest.java +++ b/wsclient/src/test/java/org/hpccsystems/ws/client/WUQueryTest.java @@ -5,7 +5,6 @@ import java.util.List; -import org.hpccsystems.ws.client.platform.test.BaseRemoteTest; import org.hpccsystems.ws.client.wrappers.ApplicationValueWrapper; import org.hpccsystems.ws.client.wrappers.ArrayOfECLExceptionWrapper; import org.hpccsystems.ws.client.wrappers.ArrayOfEspExceptionWrapper; diff --git a/wsclient/src/test/java/org/hpccsystems/ws/client/WsAttributesClientTest.java b/wsclient/src/test/java/org/hpccsystems/ws/client/WsAttributesClientTest.java index 1e8fff717..7e69a5f6b 100644 --- a/wsclient/src/test/java/org/hpccsystems/ws/client/WsAttributesClientTest.java +++ b/wsclient/src/test/java/org/hpccsystems/ws/client/WsAttributesClientTest.java @@ -22,7 +22,6 @@ HPCC SYSTEMS software Copyright (C) 2019 HPCC Systems®. import java.net.URL; import org.hpccsystems.ws.client.extended.HPCCWsAttributesClient; -import org.hpccsystems.ws.client.platform.test.BaseRemoteTest; import org.hpccsystems.ws.client.utils.Connection; import org.junit.Assert; import org.junit.BeforeClass; diff --git a/wsclient/src/test/java/org/hpccsystems/ws/client/WsClientTest.java b/wsclient/src/test/java/org/hpccsystems/ws/client/WsClientTest.java index 60b557bab..9cff382f7 100644 --- a/wsclient/src/test/java/org/hpccsystems/ws/client/WsClientTest.java +++ b/wsclient/src/test/java/org/hpccsystems/ws/client/WsClientTest.java @@ -1,7 +1,5 @@ package org.hpccsystems.ws.client; -import org.hpccsystems.ws.client.platform.test.BaseRemoteTest; - import org.junit.Assert; import org.junit.Assume; import org.junit.Test; diff --git a/wsclient/src/test/java/org/hpccsystems/ws/client/WsDFUClientTest.java b/wsclient/src/test/java/org/hpccsystems/ws/client/WsDFUClientTest.java index 82a010c16..77e6fd1c8 100644 --- a/wsclient/src/test/java/org/hpccsystems/ws/client/WsDFUClientTest.java +++ b/wsclient/src/test/java/org/hpccsystems/ws/client/WsDFUClientTest.java @@ -17,7 +17,6 @@ import org.apache.axis2.AxisFault; import org.hpccsystems.ws.client.HPCCWsDFUClient.DFUQueryFileType; import org.hpccsystems.ws.client.gen.axis2.wsdfu.latest.DFUFileType; -import org.hpccsystems.ws.client.platform.test.BaseRemoteTest; import org.hpccsystems.ws.client.wrappers.ArrayOfEspExceptionWrapper; import org.hpccsystems.ws.client.wrappers.gen.wsdfu.AddtoSuperfileRequestWrapper; import org.hpccsystems.ws.client.wrappers.gen.wsdfu.AddtoSuperfileResponseWrapper; diff --git a/wsclient/src/test/java/org/hpccsystems/ws/client/WsDFUXRefClientTest.java b/wsclient/src/test/java/org/hpccsystems/ws/client/WsDFUXRefClientTest.java index 20f459915..002c936d7 100644 --- a/wsclient/src/test/java/org/hpccsystems/ws/client/WsDFUXRefClientTest.java +++ b/wsclient/src/test/java/org/hpccsystems/ws/client/WsDFUXRefClientTest.java @@ -3,7 +3,6 @@ import static org.junit.Assert.assertNotNull; import org.apache.axis2.AxisFault; -import org.hpccsystems.ws.client.platform.test.BaseRemoteTest; import org.hpccsystems.ws.client.utils.HpccContainerizedUnsupportedException; import org.hpccsystems.ws.client.wrappers.ArrayOfXRefDirectoryWrapper; import org.hpccsystems.ws.client.wrappers.ArrayOfXRefFileWrapper; diff --git a/wsclient/src/test/java/org/hpccsystems/ws/client/WsSMCClientTest.java b/wsclient/src/test/java/org/hpccsystems/ws/client/WsSMCClientTest.java index 5e0326dcc..8a22c0d74 100644 --- a/wsclient/src/test/java/org/hpccsystems/ws/client/WsSMCClientTest.java +++ b/wsclient/src/test/java/org/hpccsystems/ws/client/WsSMCClientTest.java @@ -6,7 +6,6 @@ import org.apache.axis2.AxisFault; import org.hpccsystems.ws.client.platform.Version; -import org.hpccsystems.ws.client.platform.test.BaseRemoteTest; import org.hpccsystems.ws.client.utils.Connection; import org.junit.Assert; import org.junit.Test; diff --git a/wsclient/src/test/java/org/hpccsystems/ws/client/platform/EclParseRegressionTest.java b/wsclient/src/test/java/org/hpccsystems/ws/client/platform/EclParseRegressionTest.java index 664a46dd5..41736dc53 100644 --- a/wsclient/src/test/java/org/hpccsystems/ws/client/platform/EclParseRegressionTest.java +++ b/wsclient/src/test/java/org/hpccsystems/ws/client/platform/EclParseRegressionTest.java @@ -23,9 +23,9 @@ import java.util.List; import org.apache.commons.io.FileUtils; +import org.hpccsystems.ws.client.BaseRemoteTest; import org.hpccsystems.ws.client.HPCCWsDFUClient; import org.hpccsystems.ws.client.HPCCWsWorkUnitsClient; -import org.hpccsystems.ws.client.platform.test.BaseRemoteTest; import org.hpccsystems.ws.client.wrappers.ArrayOfEspExceptionWrapper; import org.hpccsystems.ws.client.wrappers.EclRecordWrapper; import org.hpccsystems.ws.client.wrappers.wsdfu.DFUFileDetailWrapper; @@ -180,7 +180,7 @@ private int countMatches(String str, String pattern) { int index = 0; int matches = 0; - do + do { index = str.indexOf(pattern,index); if (index >= 0)