Merge branch '9848-copy-container-output' refs #9848
[arvados.git] / sdk / go / arvadosclient / arvadosclient_test.go
index bf8debe24386f3e6ade44d997a531041cf07bb08..8e32efe4f987adccbe77b573a15ab27dbdfcc707 100644 (file)
@@ -29,6 +29,11 @@ func (s *ServerRequiredSuite) SetUpSuite(c *C) {
        RetryDelay = 0
 }
 
+func (s *ServerRequiredSuite) TearDownSuite(c *C) {
+       arvadostest.StopKeep(2)
+       arvadostest.StopAPI()
+}
+
 func (s *ServerRequiredSuite) SetUpTest(c *C) {
        arvadostest.ResetEnv()
 }
@@ -322,11 +327,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"}`},
                },