diff options
| author | Dmitry Vyukov <dvyukov@google.com> | 2017-12-22 19:59:56 +0100 |
|---|---|---|
| committer | Dmitry Vyukov <dvyukov@google.com> | 2017-12-22 19:59:56 +0100 |
| commit | 73aba437a774237b1130837b856f3b40b3ec3bf0 (patch) | |
| tree | 900197933b2481cfe4ab1f12a91693ffef617b0b | |
| parent | 8e4090902540da8c6e8fa640a0fc325c29c3efcb (diff) | |
dashboard/app: bump max repros per bug to 10
We badly need repros. Developers complain.
| -rw-r--r-- | dashboard/app/api.go | 4 | ||||
| -rw-r--r-- | dashboard/app/app_test.go | 6 |
2 files changed, 6 insertions, 4 deletions
diff --git a/dashboard/app/api.go b/dashboard/app/api.go index 5a0d3cdf3..44e5d6ce3 100644 --- a/dashboard/app/api.go +++ b/dashboard/app/api.go @@ -51,6 +51,8 @@ type JSONHandler func(c context.Context, r *http.Request) (interface{}, error) type APIHandler func(c context.Context, r *http.Request) (interface{}, error) type APINamespaceHandler func(c context.Context, ns string, r *http.Request) (interface{}, error) +const maxReproPerBug = 10 + // Overridable for testing. var timeNow = func(c context.Context) time.Time { return time.Now() @@ -747,7 +749,7 @@ func needRepro(c context.Context, bug *Bug) bool { func needReproForBug(bug *Bug) bool { return bug.ReproLevel < ReproLevelC && - bug.NumRepro < 5 && + bug.NumRepro < maxReproPerBug && len(bug.Commits) == 0 && bug.Title != corruptedReportTitle } diff --git a/dashboard/app/app_test.go b/dashboard/app/app_test.go index e30cc92d4..990247a02 100644 --- a/dashboard/app/app_test.go +++ b/dashboard/app/app_test.go @@ -283,7 +283,7 @@ func testNeedRepro3(t *testing.T, crashCtor func(c *Ctx) *dashapi.Crash) { cid := testCrashID(crash1) needReproResp := new(dashapi.NeedReproResp) - for i := 0; i < 5; i++ { + for i := 0; i < maxReproPerBug; i++ { c.expectOK(c.API(client1, key1, "report_crash", crash1, resp)) c.expectEQ(resp.NeedRepro, true) @@ -317,7 +317,7 @@ func testNeedRepro4(t *testing.T, crashCtor func(c *Ctx) *dashapi.Crash) { cid := testCrashID(crash1) needReproResp := new(dashapi.NeedReproResp) - for i := 0; i < 4; i++ { + for i := 0; i < maxReproPerBug-1; i++ { c.expectOK(c.API(client1, key1, "report_crash", crash1, resp)) c.expectEQ(resp.NeedRepro, true) @@ -348,7 +348,7 @@ func testNeedRepro5(t *testing.T, crashCtor func(c *Ctx) *dashapi.Crash) { cid := testCrashID(crash1) needReproResp := new(dashapi.NeedReproResp) - for i := 0; i < 4; i++ { + for i := 0; i < maxReproPerBug-1; i++ { c.expectOK(c.API(client1, key1, "report_crash", crash1, resp)) c.expectEQ(resp.NeedRepro, true) |
