Skip to content

Commit

Permalink
o/snapstate: bump timeout in test*ComponentsRunThrough variants (cano…
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewphelpsj authored Oct 2, 2024
1 parent 0193451 commit 19c3f09
Showing 1 changed file with 18 additions and 3 deletions.
21 changes: 18 additions & 3 deletions overlord/snapstate/snapstate_update_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15023,7 +15023,12 @@ func (s *snapmgrTestSuite) testUpdateWithComponentsRunThrough(c *C, opts updateW
c.Assert(te.Kind(), Equals, "validate-snap")
}

s.settle(c)
// we manually settle here since this test can be slow when the host is
// under load
s.state.Unlock()
err = s.o.Settle(testutil.HostScaledTimeout(15 * time.Second))
s.state.Lock()
c.Assert(err, IsNil, Commentf("change tasks:\n%s", printTasks(chg.Tasks())))

if opts.undo {
c.Assert(chg.Err(), NotNil, Commentf("change tasks:\n%s", printTasks(chg.Tasks())))
Expand Down Expand Up @@ -15718,7 +15723,12 @@ components:
c.Assert(te, NotNil)
c.Assert(te.Kind(), Equals, "prepare-snap")

s.settle(c)
// we manually settle here since this test can be slow when the host is
// under load
s.state.Unlock()
err = s.o.Settle(testutil.HostScaledTimeout(15 * time.Second))
s.state.Lock()
c.Assert(err, IsNil, Commentf("change tasks:\n%s", printTasks(chg.Tasks())))

if undo {
c.Assert(chg.Err(), NotNil, Commentf("change tasks:\n%s", printTasks(chg.Tasks())))
Expand Down Expand Up @@ -16133,7 +16143,12 @@ func (s *snapmgrTestSuite) testUpdateWithComponentsRunThroughOnlyComponentUpdate
c.Assert(te, NotNil)
c.Assert(te.Kind(), Equals, "prepare-snap")

s.settle(c)
// we manually settle here since this test can be slow when the host is
// under load
s.state.Unlock()
err = s.o.Settle(testutil.HostScaledTimeout(15 * time.Second))
s.state.Lock()
c.Assert(err, IsNil, Commentf("change tasks:\n%s", printTasks(chg.Tasks())))

if opts.undo {
c.Assert(chg.Err(), NotNil, Commentf("change tasks:\n%s", printTasks(chg.Tasks())))
Expand Down

0 comments on commit 19c3f09

Please sign in to comment.