apiserver/facades/controller/caasunitprovisioner: sporadic test failure in TestUpdateApplicationsUnits

Bug #1744579 reported by Roger Peppe
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Canonical Juju
Fix Released
Medium
Unassigned

Bug Description

The test CAASProvisionerSuite.TestUpdateApplicationsUnits in the package github.com/juju/juju/apiserver/facades/controller/caasunitprovisioner fails sporadically.

Tested with commit 2118c765b23491f4e68d000e79d4445929d3e8ff.

 FAIL: provisioner_test.go:194: CAASProvisionerSuite.TestUpdateApplicationsUnits

 [LOG] 0:00.000 DEBUG juju.apiserver.controller.caasunitprovisioner unit "gitlab/0" (uuid) has changed in the cloud
 [LOG] 0:00.000 DEBUG juju.apiserver.controller.caasunitprovisioner unit "gitlab/1" is unallocated
 [LOG] 0:00.000 DEBUG juju.apiserver.controller.caasunitprovisioner unit "gitlab/2" (uuid2) has been removed from the cloud
 provisioner_test.go:224:
     s.st.application.CheckCall(c, 0, "AddOperation", state.UnitUpdateProperties{
         ProviderId: "last-uuid",
         Address: "last-address", Ports: []string{"last-port"},
         Status: &status.StatusInfo{Status: status.Running, Message: "last message"},
     })
 /home/rog/src/go/src/github.com/juju/testing/stub.go:239:
     c.Check(call, jc.DeepEquals, expected)
 ... obtained testing.StubCall = testing.StubCall{FuncName:"AddOperation", Args:[]interface {}{state.UnitUpdateProperties{ProviderId:"another-uuid", Address:"another-address", Ports:[]string{"another-port"}, Status:(*status.StatusInfo)(0xc420420b40)}}}
 ... expected testing.StubCall = testing.StubCall{FuncName:"AddOperation", Args:[]interface {}{state.UnitUpdateProperties{ProviderId:"last-uuid", Address:"last-address", Ports:[]string{"last-port"}, Status:(*status.StatusInfo)(0xc420420c30)}}}
 ... mismatch at .Args[0].ProviderId: unequal; obtained "another-uuid"; expected "last-uuid"

 provisioner_test.go:236:
     s.st.application.units[1].(*mockUnit).CheckCall(c, 1, "UpdateOperation", state.UnitUpdateProperties{
         ProviderId: "another-uuid",
         Address: "another-address", Ports: []string{"another-port"},
         Status: &status.StatusInfo{Status: status.Running, Message: "another message"},
     })
 /home/rog/src/go/src/github.com/juju/testing/stub.go:239:
     c.Check(call, jc.DeepEquals, expected)
 ... obtained testing.StubCall = testing.StubCall{FuncName:"UpdateOperation", Args:[]interface {}{state.UnitUpdateProperties{ProviderId:"last-uuid", Address:"last-address", Ports:[]string{"last-port"}, Status:(*status.StatusInfo)(0xc420420b10)}}}
 ... expected testing.StubCall = testing.StubCall{FuncName:"UpdateOperation", Args:[]interface {}{state.UnitUpdateProperties{ProviderId:"another-uuid", Address:"another-address", Ports:[]string{"another-port"}, Status:(*status.StatusInfo)(0xc4202a5e60)}}}
 ... mismatch at .Args[0].ProviderId: unequal; obtained "last-uuid"; expected "another-uuid"

 OOPS: 0 passed, 1 FAILED
 --- FAIL: TestAll (0.00s)

tags: added: intermittent-failure unit-tests
Changed in juju:
status: New → Triaged
importance: Undecided → Medium
Revision history for this message
Anastasia (anastasia-macmood) wrote :

Since the bug was filed a lot of work continues to be done in the area.
Right now, there is not one TestUpdateApplicationsUnits but 3:

* CAASProvisionerSuite.TestUpdateApplicationsUnitsNotAlive
* CAASProvisionerSuite.TestUpdateApplicationsUnitsWithStorage
* CAASProvisionerSuite.TestUpdateApplicationsUnitsWithStorageNoBackingVolume

All pass fine locally under pressure. This reported failure must have been fixed as part of the ongoing CAAS work.

Changed in juju:
status: Triaged → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.