Skip to content

Commit 0a03071

Browse files
committed
fix test
1 parent b769afc commit 0a03071

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/test/java/org/breedinginsight/brapps/importer/ExperimentFileImportTest.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1204,7 +1204,7 @@ public void importNewObsAfterFirstExpWithObsAndTimestamps() {
12041204

12051205
// In the first upload, only 1 trait should be present.
12061206
List<Trait> initialTraits = List.of(traits.get(0));
1207-
importTestUtils.uploadAndFetchWorkflow(importTestUtils.writeExperimentDataToFile(List.of(newExp), initialTraits), null, true, client, program, mappingId, newExperimentWorkflowId);
1207+
importTestUtils.uploadAndFetchWorkflow(importTestUtils.writeExperimentDataToFile(List.of(newExp), initialTraits, false), null, true, client, program, mappingId, newExperimentWorkflowId);
12081208

12091209
BrAPITrial brAPITrial = brAPITrialDAO.getTrialsByName(List.of((String)newExp.get(Columns.EXP_TITLE)), program).get(0);
12101210
Optional<BrAPIExternalReference> trialIdXref = Utilities.getExternalReference(brAPITrial.getExternalReferences(), String.format("%s/%s", BRAPI_REFERENCE_SOURCE, ExternalReferenceSource.TRIALS.getName()));
@@ -1229,13 +1229,13 @@ public void importNewObsAfterFirstExpWithObsAndTimestamps() {
12291229
newObservation.put(Columns.BLOCK_NUM, "1");
12301230
newObservation.put(Columns.ROW, "1");
12311231
newObservation.put(Columns.COLUMN, "1");
1232-
newObservation.put(Columns.OBS_UNIT_ID, ouIdXref.get().getReferenceId());
1232+
newObservation.put("Plot "+OBSERVATION_UNIT_ID_SUFFIX, ouIdXref.get().getReferenceId());
12331233
newObservation.put(traits.get(0).getObservationVariableName(), "1");
12341234
newObservation.put(traits.get(1).getObservationVariableName(), "1");
12351235

12361236
// Send overwrite parameters in request body to allow the append workflow to work normally.
12371237
Map<String, String> userData = Map.of("overwrite", "true", "overwriteReason", "testing");
1238-
JsonObject result = importTestUtils.uploadAndFetchWorkflow(importTestUtils.writeExperimentDataToFile(List.of(newObservation), traits), userData, true, client, program, mappingId, appendOverwriteWorkflowId);
1238+
JsonObject result = importTestUtils.uploadAndFetchWorkflow(importTestUtils.writeExperimentDataToFile(List.of(newObservation), traits, true), userData, true, client, program, mappingId, appendOverwriteWorkflowId);
12391239

12401240
JsonArray previewRows = result.get("preview").getAsJsonObject().get("rows").getAsJsonArray();
12411241
assertEquals(1, previewRows.size());

0 commit comments

Comments
 (0)