Skip to content
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

Fix flaky ProjectServiceV1ListProjectTest #1016

Merged
merged 2 commits into from
Aug 16, 2024

Conversation

ikhoon
Copy link
Contributor

@ikhoon ikhoon commented Aug 16, 2024

Motivation:

We may not get the new ProjectRole via projects API as it is updated. Because it is updated asynchronously.

ProjectServiceV1ListProjectTest > userRoleWithLoginUser() FAILED
    org.opentest4j.AssertionFailedError:
    expected: OWNER
     but was: GUEST
        at app//com.linecorp.centraldogma.server.internal.api.ProjectServiceV1ListProjectTest.userRoleWithLoginUser(ProjectServiceV1ListProjectTest.java:288)

Modifications:

  • Wrap the test assertions with await().untilAsserted()

Result:

Stable CI results

Motivation:

We may not get the new ProjectRole via projects API as it is updated.
Because it is updated asynchronously.
```
ProjectServiceV1ListProjectTest > userRoleWithLoginUser() FAILED
    org.opentest4j.AssertionFailedError:
    expected: OWNER
     but was: GUEST
        at app//com.linecorp.centraldogma.server.internal.api.ProjectServiceV1ListProjectTest.userRoleWithLoginUser(ProjectServiceV1ListProjectTest.java:288)
```

Modifications:

- Wrap the test assertions with `await().untilAsserted()`

Result:

Stable CI results
Copy link
Member

@minwoox minwoox left a comment

Choose a reason for hiding this comment

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

👍 👍 👍

@ikhoon ikhoon merged commit 39ffac0 into line:main Aug 16, 2024
10 checks passed
@ikhoon ikhoon deleted the flaky-userRoleWithLoginUser branch August 16, 2024 08:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants