-
Notifications
You must be signed in to change notification settings - Fork 7
Export full search index as text #7040
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
Conversation
| deleteFolderAndVerifyNoResults(); | ||
| exportSearchIndexAndVerifyResults(); |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, will do.
labkey-danield
left a comment
There was a problem hiding this 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 |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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.
| checker().wrapAssertion(() -> Assertions.assertThat(fileRowCount) | ||
| .as("expect minimum 2000 rows") | ||
| .isGreaterThan(2000)); |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
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