7546: update some of the failure tests to use keepclient.Retries = 0, so that the...
authorradhika <radhika@curoverse.com>
Tue, 20 Oct 2015 17:41:29 +0000 (13:41 -0400)
committerradhika <radhika@curoverse.com>
Tue, 20 Oct 2015 17:41:29 +0000 (13:41 -0400)
retrying a test that is designed for failures. This update brings down the keepclient_test runtime from 49s to 10s.

sdk/go/keepclient/keepclient_test.go

index 2ff1819eb5452764a7fd88abab56fd7b139d1b4d..c03ba90736868d15cdba09d0638e160e60d57998 100644 (file)
@@ -442,6 +442,7 @@ func (s *StandaloneSuite) TestPutWithTooManyFail(c *C) {
        kc, _ := MakeKeepClient(&arv)
 
        kc.Want_replicas = 2
+       kc.Retries = 0
        arv.ApiToken = "abc123"
        localRoots := make(map[string]string)
        writableLocalRoots := make(map[string]string)
@@ -552,6 +553,7 @@ func (s *StandaloneSuite) TestGetFail(c *C) {
        kc, _ := MakeKeepClient(&arv)
        arv.ApiToken = "abc123"
        kc.SetServiceRoots(map[string]string{"x": ks.url}, nil, nil)
+       kc.Retries = 0
 
        r, n, url2, err := kc.Get(hash)
        c.Check(err, Equals, BlockNotFound)
@@ -808,6 +810,7 @@ func (s *StandaloneSuite) TestGetWithFailures(c *C) {
        }
 
        kc.SetServiceRoots(localRoots, writableLocalRoots, nil)
+       kc.Retries = 0
 
        // This test works only if one of the failing services is
        // attempted before the succeeding service. Otherwise,