Skip to content

Commit

Permalink
Merge branch 'devNumericFormatBug' into devParquetDuckdb
Browse files Browse the repository at this point in the history
  • Loading branch information
alexisszmundy committed Jul 5, 2024
2 parents d83edab + 7b1a304 commit 9e420bd
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -334,8 +334,14 @@ public void checkVariableValue(String idUE, String expectedValue, String variabl
if (tableName == null || tableName.isEmpty())
tableName = Constants.ROOT_GROUP_NAME;

// Go to first datetime folder
Path executionOutDirectory = outDirectory.resolve(Objects.requireNonNull(new File(outDirectory.toString()).listFiles(File::isDirectory))[0].getName());

File outputReportingDataFile = new File(executionOutDirectory + "/" + outDirectory.getFileName() + "_" + tableName + ".csv");


// Get reader to read the root table written in outputs
CSVReader csvReader = getCSVReader(outputFiles.getOutputFolder().resolve(outputFiles.outputFileName(tableName)));
CSVReader csvReader = getCSVReader(outputReportingDataFile.toPath());
// get header
String[] header = csvReader.readNext();
int idUEPosition = Arrays.asList(header).indexOf(Constants.ROOT_IDENTIFIER_NAME);
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
Feature: Do we save number format correctly ?
Everybody wants to know if we save them correctly

Scenario Outline: Do we export large numbers in right format (without E)
Given Step 0 : We have some survey in directory "<Directory>"
When Step 1 : We launch main service
Then Step 7 : We check that id "<SurveyUnitId>" has value "<ExpectedValue>" for variable "<VariableName>" in table "<TableName>"
Examples:
|Directory |SurveyUnitId |ExpectedValue |VariableName |TableName |
|SAMPLETEST-DATAONLY-v1 |0000005 |19800340 |T_NPIECES |RACINE |

Original file line number Diff line number Diff line change
Expand Up @@ -2928,7 +2928,7 @@
<PREVIOUS type="null" />
</T_SITUCONJ1>
<T_NPIECES>
<COLLECTED type="number">5</COLLECTED>
<COLLECTED type="number">19800340</COLLECTED>
<EDITED type="null" />
<INPUTED type="null" />
<FORCED type="null" />
Expand Down

0 comments on commit 9e420bd

Please sign in to comment.