Skip to content

Conversation

@labkey-chrisj
Copy link
Contributor

@labkey-chrisj labkey-chrisj commented Sep 15, 2025

Rationale

This change appends a brief check to the end of SearchTest, to export the full-text index and verify some specific items that should be indexed are present. Ideally it also ensures no exceptions in the log arise as a result of exporting the index, and it ensures the full-text log has at least 2k rows

Related issue https://www.labkey.org/home/Developer/issues/issues-details.view?issueId=51159

Related PR:
testAutomation helper to get file line count LabKey/testAutomation#2689

Comment on lines 236 to 240
deleteFolderAndVerifyNoResults();
exportSearchIndexAndVerifyResults();
Copy link
Member

Choose a reason for hiding this comment

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

This should check the search index before deleting the folder.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks, will do.

Copy link
Contributor

@labkey-danield labkey-danield left a comment

Choose a reason for hiding this comment

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

Wouldn't hurt to run a couple of the search test on TeamCity to verify this works.

@Override
@LogMethod
protected void doVerifySteps()
protected void doVerifySteps() throws IOException, CommandException
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think this throws a CommandException. exportSearchIndexAndVerifyResults throws only an IOException.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

OK, I'll clear those out


@Test
public void testSearch()
public void testSearch() throws IOException, CommandException
Copy link
Contributor

Choose a reason for hiding this comment

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

Similarly you shouldn't need a CommandException.

Comment on lines 479 to 481
checker().wrapAssertion(() -> Assertions.assertThat(fileRowCount)
.as("expect minimum 2000 rows")
.isGreaterThan(2000));
Copy link
Contributor

@labkey-danield labkey-danield Sep 17, 2025

Choose a reason for hiding this comment

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

Where did this 2000 rows come from?
What if this is the first test, or only test, to run?
If you got this number from a local run I would suggest that you run against a bootstrap database and compare.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It was a wild guess, something to see what I'd get in a real-life run on TC
It turns out that my test runs have come back with results as low as ~359ish, I'll try a local bootstrap run as well

@labkey-chrisj labkey-chrisj merged commit f1e6c1e into develop Sep 17, 2025
10 checks passed
@labkey-chrisj labkey-chrisj deleted the fb_export_search_index branch September 17, 2025 23:25
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.

5 participants