traPtitech / traPtitech/traPortfolio
TestCreateProjectがたまに落ちる
Open
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 6
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
再テストすると大体通る
--- FAIL: TestCreateProject (0.29s)
--- FAIL: TestCreateProject/201_with_kanji (0.00s)
project_test.go:202:
Error Trace: /home/runner/work/traPortfolio/traPortfolio/integration_tests/testutils/assert.go:16
/home/runner/work/traPortfolio/traPortfolio/integration_tests/handler/project_test.go:202
Error: Not equal:
expected: 201
actual : 400
Test: TestCreateProject/201_with_kanji
project_test.go:202:
Error Trace: /home/runner/work/traPortfolio/traPortfolio/integration_tests/testutils/assert.go:33
/home/runner/work/traPortfolio/traPortfolio/integration_tests/handler/project_test.go:202
Error: Not equal:
expected: map[string]interface {}{"duration":map[string]interface {}{"since":map[string]interface {}{"semester":0, "year":2018}, "until":map[string]interface {}{"semester":0, "year":2018}}, "id":"00000000-0000-0000-0000-000000000000", "name":"亜亜亜亜亜亜亜亜亜亜亜亜亜亜亜亜亜亜亜亜亜亜亜亜亜亜亜亜亜亜亜亜"}
actual : map[string]interface {}{"message":"Bad Request: argument error"}
Diff:
--- Expected
+++ Actual
@@ -1,14 +1,3 @@
-(map[string]interface {}) (len=3) {
- (string) (len=8) "duration": (map[string]interface {}) (len=2) {
- (string) (len=5) "since": (map[string]interface {}) (len=2) {
- (string) (len=8) "semester": (float64) 0,
- (string) (len=4) "year": (float64) 2018
- },
- (string) (len=5) "until": (map[string]interface {}) (len=2) {
- (string) (len=8) "semester": (float64) 0,
- (string) (len=4) "year": (float64) 2018
- }
- },
- (string) (len=2) "id": (string) (len=36) "00000000-0000-0000-0000-000000000000",
- (string) (len=4) "name": (string) (len=96) "亜亜亜亜亜亜亜亜亜亜亜亜亜亜亜亜亜亜亜亜亜亜亜亜亜亜亜亜亜亜亜亜"
+(map[string]interface {}) (len=1) {
+ (string) (len=7) "message": (string) (len=27) "Bad Request: argument error"
}
Test: TestCreateProject/201_with_kanji
--- FAIL: TestCreateProject/201 (0.00s)
project_test.go:202:
Error Trace: /home/runner/work/traPortfolio/traPortfolio/integration_tests/testutils/assert.go:16
/home/runner/work/traPortfolio/traPortfolio/integration_tests/handler/project_test.go:202
Error: Not equal:
expected: 201
actual : 400
Test: TestCreateProject/201
project_test.go:202:
Error Trace: /home/runner/work/traPortfolio/traPortfolio/integration_tests/testutils/assert.go:33
/home/runner/work/traPortfolio/traPortfolio/integration_tests/handler/project_test.go:202
Error: Not equal:
expected: map[string]interface {}{"duration":map[string]interface {}{"since":map[string]interface {}{"semester":0, "year":2018}, "until":map[string]interface {}{"semester":0, "year":2018}}, "id":"00000000-0000-0000-0000-000000000000", "name":"9gAmHq6MS9"}
actual : map[string]interface {}{"message":"Bad Request: argument error"}
Diff:
--- Expected
+++ Actual
@@ -1,14 +1,3 @@
-(map[string]interface {}) (len=3) {
- (string) (len=8) "duration": (map[string]interface {}) (len=2) {
- (string) (len=5) "since": (map[string]interface {}) (len=2) {
- (string) (len=8) "semester": (float64) 0,
- (string) (len=4) "year": (float64) 2018
- },
- (string) (len=5) "until": (map[string]interface {}) (len=2) {
- (string) (len=8) "semester": (float64) 0,
- (string) (len=4) "year": (float64) 2018
- }
- },
- (string) (len=2) "id": (string) (len=36) "00000000-0000-0000-0000-000000000000",
- (string) (len=4) "name": (string) (len=10) "9gAmHq6MS9"
+(map[string]interface {}) (len=1) {
+ (string) (len=7) "message": (string) (len=27) "Bad Request: argument error"
}
Test: TestCreateProject/201
https://github.com/traPtitech/traPortfolio/actions/runs/5700158665/job/15449742238
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with integration_tests/handler/project_test.go around line 202 and integration_tests/testutils/assert.go, then run TestCreateProject repeatedly to reproduce the intermittent 400 response. Compare the 201 and 201_with_kanji cases with the linked CI failure; done means both cases consistently return 201 with the expected project response.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- testing-qa
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100