Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(115)

Issue 100730043: worker/provisioner: make tests deterministic

Can't Edit
Can't Publish+Mail
Start Review
Created:
11 years, 9 months ago by axw
Modified:
11 years, 9 months ago
Reviewers:
mp+220668, menn0
Visibility:
Public.

Description

worker/provisioner: make tests deterministic Fix TestProvisionerRetriesTransientErrors which was relying on non-deterministic behaviour of the provisioner. Wait for machine-1 and then machine-2 to be provisioned serially. Fixes lp:1322037 https://code.launchpad.net/~axwalk/juju-core/lp1322037-workerprovisioner-deterministic/+merge/220668 (do not edit description out of merge proposal)

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+9 lines, -2 lines) Patch
A [revision details] View 1 chunk +2 lines, -0 lines 0 comments Download
M worker/provisioner/provisioner_test.go View 2 chunks +7 lines, -2 lines 0 comments Download

Messages

Total messages: 3
axw
Please take a look.
11 years, 9 months ago (2014-05-22 15:11:26 UTC) #1
menn0
I *think* I understand what's going on here. Sometimes machine 3 or 4 could end ...
11 years, 9 months ago (2014-05-22 22:24:54 UTC) #2
axw
11 years, 9 months ago (2014-05-23 00:44:03 UTC) #3
On 2014/05/22 22:24:54, menn0 wrote:
> I *think* I understand what's going on here. Sometimes machine 3 or 4 could
end
> up being unintentionally up when the test requires that they are only on their
> way up at the top of the test?

There was non-determinism in the order in which m1 and m2 were provisioned. What
was happening was m1 and m2 were added, both picked up (in a batch) by the
provisioner, and the provisioner would provision them in a "random" order. It
was deterministic in Go 1.2, but not so in 1.3 or gccgo (or the order changed at
any rate).

My change simply waits for machines 1 before going on to 2, and then on to 3.

> LGTM.
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b