Use --utc instead of patching time.Local. #8152

Merged
merged 1 commit into from Nov 29, 2017

Conversation

Projects
None yet
3 participants
Owner

jameinel commented Nov 29, 2017

Description of change

It isn't safe to patch global objects (racy), so instead just ask for
utc times from the command.

QA steps

go test --race --check.f "StatusHistory|SummaryStatusWithUnresolvable"

Passes with this fix, fails because of a race between the test suite runner calling time.Now() and the test suite patching time.Local that is used by time.Now.

Documentation changes

No

Bug reference

lp:1735112

Use --utc instead of patching time.Local.
It isn't safe to patch global objects (racy), so instead just ask for
utc times from the command.

Addresses https://bugs.launchpad.net/juju/+bug/1735112

@jameinel jameinel changed the base branch from develop to 2.3 Nov 29, 2017

Owner

jameinel commented Nov 29, 2017

$$merge$$

Contributor

jujubot commented Nov 29, 2017

Status: merge request accepted. Url: http://ci.jujucharms.com/job/github-merge-juju

@jujubot jujubot merged commit e58e8b9 into juju:2.3 Nov 29, 2017

1 check passed

continuous-integration/jenkins/pr-merge This commit looks good
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment