5538: Update comments to match new tests.
authorTom Clegg <tom@curoverse.com>
Tue, 10 Nov 2015 16:33:32 +0000 (11:33 -0500)
committerTom Clegg <tom@curoverse.com>
Tue, 10 Nov 2015 16:33:32 +0000 (11:33 -0500)
sdk/go/arvadosclient/arvadosclient_test.go

index bf8debe24386f3e6ade44d997a531041cf07bb08..f2fd0b1b334a3e3790e6bb8c39a60db8a335ad66 100644 (file)
@@ -322,11 +322,16 @@ func (s *MockArvadosServerSuite) TestWithRetries(c *C) {
                {
                        "get", 0, 401, []int{500, 401, 200}, []string{``, ``, `{"ok":"ok"}`},
                },
-               // Use nil responseBody to simulate error during request processing
-               // Even though retryable, the simulated error applies during reties also, and hence "get" also eventually fails in this test.
+
+               // Response code -1 simulates an HTTP/network error
+               // (i.e., Do() returns an error; there is no HTTP
+               // response status code).
+
+               // Succeed on second retry
                {
                        "get", 0, 200, []int{-1, -1, 200}, []string{``, ``, `{"ok":"ok"}`},
                },
+               // "POST" is not safe to retry: fail after one error
                {
                        "create", 0, -1, []int{-1, 200}, []string{``, `{"ok":"ok"}`},
                },