Skip to content

Fix random failures in the ListTest and SampleTypeFolderExportImportTest#2550

Merged
labkey-danield merged 4 commits intodevelopfrom
fb_fixVariousTestIssues
Jul 11, 2025
Merged

Fix random failures in the ListTest and SampleTypeFolderExportImportTest#2550
labkey-danield merged 4 commits intodevelopfrom
fb_fixVariousTestIssues

Conversation

@labkey-danield
Copy link
Contributor

Rationale

Fixing two test issues. The failure in SampleTypeFolderExportImportTest appears to be random, and may not really need this change, but I think checking is still a good thing to do.

Related Pull Requests

  • None.

Changes

  • In ListTest, wait for the DataRegions that contain the list history.
  • For SampleTypeFolderExportImportTest.testExportImportSampleTypesWithAssayRuns validate that file has been uploaded.

Validate file has been uploaded on the form.
List<FieldDefinition> testFields = SampleTypeAPIHelper.sampleTypeTestFields(true);
SampleTypeDefinition testSampleType = new SampleTypeDefinition(testSamples).setFields(testFields)
.addParentAlias("SelfParent"); // to derive from samles in the current type
.addParentAlias("SelfParent"); // to derive from samples in the current type
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for fixing that

// setFormElement doesn't check that the form element is set.
// Because this test uses random field names, we should validate that the file was actually uploaded. If the
// file is missing later in the test, we can be sure it was present at this point.
Assert.assertFalse("File not uploaded.",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider maybe using an awaiting assert here, if file-upload taking a second isn't a failure-worthy situation.

@labkey-danield labkey-danield merged commit d7a25a0 into develop Jul 11, 2025
5 of 6 checks passed
@labkey-danield labkey-danield deleted the fb_fixVariousTestIssues branch July 11, 2025 22:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants