18794: Increase timeout and logging for rails restart test.
authorTom Clegg <tom@curii.com>
Mon, 9 May 2022 14:42:34 +0000 (10:42 -0400)
committerTom Clegg <tom@curii.com>
Mon, 9 May 2022 14:42:34 +0000 (10:42 -0400)
Arvados-DCO-1.1-Signed-off-by: Tom Clegg <tom@curii.com>

lib/controller/rails_restart_test.go

index bb307d32160cd2f9ff3d679f0b9da9a1a9ba99c9..5db37c4b8a374e01dbbe36fe5f11b3dbf259da44 100644 (file)
@@ -75,7 +75,8 @@ func (s *railsRestartSuite) TestConfigReload(c *check.C) {
 
        // Wait for RailsAPI's 1 Hz reload_config thread to poll and
        // hit restart.txt
 
        // Wait for RailsAPI's 1 Hz reload_config thread to poll and
        // hit restart.txt
-       for deadline := time.Now().Add(10 * time.Second); time.Now().Before(deadline); time.Sleep(time.Second) {
+       pollstart := time.Now()
+       for deadline := time.Now().Add(20 * time.Second); time.Now().Before(deadline); time.Sleep(time.Second) {
                resp, err = hc.Do(req)
                c.Assert(err, check.IsNil)
                c.Check(resp.StatusCode, check.Equals, http.StatusOK)
                resp, err = hc.Do(req)
                c.Assert(err, check.IsNil)
                c.Check(resp.StatusCode, check.Equals, http.StatusOK)
@@ -85,5 +86,6 @@ func (s *railsRestartSuite) TestConfigReload(c *check.C) {
                        break
                }
        }
                        break
                }
        }
+       c.Logf("waited %s for rails to restart", time.Now().Sub(pollstart))
        c.Check(string(body), check.Matches, `(?ms).*`+newhash+`.*`)
 }
        c.Check(string(body), check.Matches, `(?ms).*`+newhash+`.*`)
 }