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

Do not use shared Discussion #147

Merged
merged 1 commit into from
Aug 18, 2024
Merged

Do not use shared Discussion #147

merged 1 commit into from
Aug 18, 2024

Conversation

rerost
Copy link
Owner

@rerost rerost commented Aug 18, 2024

2つ同時にテストが動くと、片方のテストが落ちる

--- PASS: TestFindByURL (0.00s)
    --- PASS: TestFindByURL/#00 (0.26s)
--- PASS: TestIssueFindLastIssue (0.39s)
=== NAME  TestCloseByURL/#00
    discussion_test.go:2[75](https://github.com/rerost/issue-creator/actions/runs/10440886388/job/28911339857#step:4:76): https://github.com/rerost/issue-creator-for-test/discussions/4 is already closed
--- PASS: TestFindLastIssue (0.00s)
    --- PASS: TestFindLastIssue/#00 (0.34s)
=== NAME  TestCloseByURL/#00
    discussion_test.go:292: https://github.com/rerost/issue-creator-for-test/discussions/4 is not close
--- FAIL: TestCloseByURL (0.00s)
    --- FAIL: TestCloseByURL/#00 (1.84s)
--- PASS: TestCreate (0.00s)
    --- PASS: TestCreate/#00 (1.95s)

https://github.com/rerost/issue-creator/actions/runs/10440886388/job/28911339857

@@ -129,6 +130,10 @@ func (r *discussionRepositoryImpl) Create(ctx context.Context, issue types.Issue
} `graphql:"node(id: $id)"`
}

// Discussion作成 -> ラベル付与 -> Discussionの取得という流れだが、たまにラベルが付与される前のDiscussionを読み取る場合がある
// そのためのSleep
time.Sleep(time.Second)
Copy link
Owner Author

Choose a reason for hiding this comment

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

たまに

discussion_test.go:104: Could not resolve to a node with the global id of 'D_kwDOJt6V-s4Aa8Js'.

のようにラベルが無いものが返ってくる場合がある

@rerost rerost merged commit 9275e9b into master Aug 18, 2024
7 checks passed
@rerost rerost deleted the rerost/fix-unparalel-test branch August 18, 2024 13:48
@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 37.77%. Comparing base (b2106e4) to head (17c846d).
Report is 2 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #147      +/-   ##
==========================================
+ Coverage   37.67%   37.77%   +0.09%     
==========================================
  Files          15       15              
  Lines         629      630       +1     
==========================================
+ Hits          237      238       +1     
  Misses        364      364              
  Partials       28       28              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

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.

2 participants