Skip to content

Commit

Permalink
Merge pull request juju#16443 from manadart/3.2-cache-add-machine-tes…
Browse files Browse the repository at this point in the history
…t-fix

juju#16443

This is a follow up to juju#16439 to restore the post-amble consumption of watcher changes to `TestAddMachine` in the `modelcache` suite.

As explained in that patch the notifications we get are not deterministic, because adding the machine is multiple steps not run transactionally. 

## QA steps

Run the test many times in a loop:
`TEST_PACKAGES="./worker/modelcache -count=30 -race" TEST_FILTER="TestAddMachine" make run-go-tests`
  • Loading branch information
jujubot authored Oct 17, 2023
2 parents c8a598e + e04a89e commit 2b660b4
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions worker/modelcache/worker_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -460,6 +460,8 @@ func (s *WorkerSuite) TestAddMachine(c *gc.C) {
cachedMachine, err := mod.Machine(machine.Id())
c.Assert(err, jc.ErrorIsNil)
c.Check(cachedMachine, gc.NotNil)

s.checkSuperfluousChanges(c, changes, change)
}

func (s *WorkerSuite) TestRemoveMachine(c *gc.C) {
Expand Down

0 comments on commit 2b660b4

Please sign in to comment.