Skip to content

update duplicate key msg in tests #2541

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jul 10, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion data/api/rlabkey-api-experiment.xml
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@
<![CDATA[
Rows via createAndLoad = 3
Rows via insert = 2
duplicate key
already exists
Rows via merge = 10
Has audit transaction id = TRUE
]]>
Expand Down
4 changes: 2 additions & 2 deletions src/org/labkey/test/tests/SampleTypeTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -449,7 +449,7 @@ public void testImportTypeOptions()
String overlap = "Name1\tToBee\n";
String newData = "Name2\tSee\n";
setFormElement(Locator.name("text"), header + overlap + newData);
clickButton("Submit", "duplicate key");
clickButton("Submit", "already exists");

log("Switch to 'Insert and Replace'");
importDataPage.setCopyPasteMerge(true);
Expand All @@ -474,7 +474,7 @@ public void testImportTypeOptions()
importDataPage = drt.clickImportBulkData();
importDataPage.setFile(sampleData);
final String errorText = importDataPage.submitExpectingError();
Assert.assertTrue("Wrong error when importing duplicate samples. " + errorText, errorText.contains("duplicate key"));
Assert.assertTrue("Wrong error when importing duplicate samples. " + errorText, errorText.contains("already exists"));
// TODO: Regression check for Issue 44202: Ugly error when data import fails due to duplicate key
// Assert.assertTrue("Wrong error when importing duplicate samples. " + errorText, errorText.length() < 100);

Expand Down