Skip to content

Conversation

@labkey-jeckels
Copy link
Contributor

Rationale

WikiCspTest has been failing in a feature branch because the error is logged a little later than expected.

https://teamcity.labkey.org/buildConfiguration/LabKey_2511Release_Community_ModuleSuites_WikiSqlserver/3826615

Related Pull Requests

Changes

  • Ensure unique container path to avoid log de-duplication
  • Wait for the CSP error to log before proceeding
  • Make sure the error gets logged

@labkey-jeckels labkey-jeckels self-assigned this Feb 3, 2026
@labkey-jeckels
Copy link
Contributor Author

@labkey-tchad the suite passed after this test update.

https://teamcity.labkey.org/buildConfiguration/LabKey_2511Release_Community_ModuleSuites_WikiSqlserver/3832854

I am pretty confident this was an intermittent problem, but it failed twice in the FB before this change.

Copy link
Member

@labkey-tchad labkey-tchad left a comment

Choose a reason for hiding this comment

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

One suggestion

Comment on lines +24 to +26
// Add something unique to make sure log de-duping doesn't suppress the logging. Otherwise, running the test multiple
// times against the same server won't actually log the CSP error after the first hit
private static final String PROJECT_NAME = TRICKY_CHARACTERS_FOR_PROJECT_NAMES + "WikiCspTest" + System.currentTimeMillis();
Copy link
Member

Choose a reason for hiding this comment

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

We disable deduping in other tests by enabling debug logging for the CSP warning endpoint.
You can do so by calling CspConfigHelper.debugCspWarnings(); somewhere in the test setup.

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