[ARVADOS] updated: 574a11b14e866b773845c3b3a3ad245f75b59e94
Git user
git at public.curoverse.com
Fri Apr 29 10:19:50 EDT 2016
Summary of changes:
sdk/go/httpserver/request_limiter_test.go | 11 +++++++++++
1 file changed, 11 insertions(+)
via 574a11b14e866b773845c3b3a3ad245f75b59e94 (commit)
from c956e6d7e42b0ea4d6194f02866a48090526d55b (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
commit 574a11b14e866b773845c3b3a3ad245f75b59e94
Author: Tom Clegg <tom at curoverse.com>
Date: Fri Apr 29 10:19:47 2016 -0400
9066: Test single successful request after busy period.
diff --git a/sdk/go/httpserver/request_limiter_test.go b/sdk/go/httpserver/request_limiter_test.go
index 839c56e..a8cc806 100644
--- a/sdk/go/httpserver/request_limiter_test.go
+++ b/sdk/go/httpserver/request_limiter_test.go
@@ -72,6 +72,17 @@ func TestRequestLimiter1(t *testing.T) {
if n200 != 1 || n503 != 9 {
t.Fatalf("Got %d 200 responses, %d 503 responses (expected 1, 9)", n200, n503)
}
+ // Now that all 10 are finished, an 11th request should
+ // succeed.
+ go func() {
+ <-h.inHandler
+ h.okToProceed <- struct{}{}
+ }()
+ resp := httptest.NewRecorder()
+ l.ServeHTTP(resp, &http.Request{})
+ if resp.Code != 200 {
+ t.Errorf("Got status %d on 11th request, want 200", resp.Code)
+ }
}
func TestRequestLimiter10(t *testing.T) {
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list