Skip to content

[usage] make tests robust #12764

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 1 commit into from
Sep 8, 2022
Merged

[usage] make tests robust #12764

merged 1 commit into from
Sep 8, 2022

Conversation

svenefftinge
Copy link
Member

Make tess robust against parallel DB changes

Related Issue(s)

Fixes #

How to test

Release Notes

NONE

Documentation

Werft options:

  • /werft with-preview

@svenefftinge svenefftinge requested a review from a team September 8, 2022 10:00
@github-actions github-actions bot added the team: webapp Issue belongs to the WebApp team label Sep 8, 2022
@@ -167,9 +178,10 @@ func TestUpdateUsageRecords(t *testing.T) {
require.NoError(t, db.UpdateUsage(context.Background(), conn, usage))

drafts, err := db.FindAllDraftUsage(context.Background(), conn)
cleaned := filter(drafts, attributionID)
Copy link
Contributor

Choose a reason for hiding this comment

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

We should check require.NoError(t, err) before we do this.

... against parallel DB changes
@roboquat roboquat merged commit a2ee46b into main Sep 8, 2022
@roboquat roboquat deleted the se/usage_tests_robust branch September 8, 2022 10:31
@roboquat roboquat added deployed: webapp Meta team change is running in production deployed Change is completely running in production labels Sep 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deployed: webapp Meta team change is running in production deployed Change is completely running in production release-note-none size/M team: webapp Issue belongs to the WebApp team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants