Skip to content
This repository has been archived by the owner on Dec 7, 2019. It is now read-only.

fix RandTestKeyPair on windows #28

Merged
merged 2 commits into from
Feb 1, 2018
Merged

Conversation

magik6k
Copy link
Contributor

@magik6k magik6k commented Jan 31, 2018

Resolution of time.Now().UnixNano() on windows is quite low, which results in generating identical key pairs when this is called in quick succession.

@ghost ghost assigned magik6k Jan 31, 2018
@ghost ghost added the in progress label Jan 31, 2018
@magik6k magik6k requested a review from Stebalien January 31, 2018 17:21
test/utils.go Outdated

// workaround for low time resolution
seed += (1 << 32) * generatedPairs
generatedPairs++
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will need to use an atomic. We have some packages (e.g., swarm) that run tests in parallel.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@magik6k magik6k force-pushed the fix/windows-tests-utils branch from a8ec7a3 to 87715ad Compare January 31, 2018 19:41
@Stebalien
Copy link
Member

Needs a go fmt ./....

@magik6k magik6k force-pushed the fix/windows-tests-utils branch from 87715ad to a17daf2 Compare January 31, 2018 23:05
@Stebalien Stebalien force-pushed the fix/windows-tests-utils branch from a17daf2 to 29ee8c4 Compare February 1, 2018 05:50
@ghost ghost assigned Stebalien Feb 1, 2018
@Stebalien
Copy link
Member

Fixed the merge conflicts.

@magik6k I know I'm probably being a hypocrite here but... please try to avoid making changes other than updating dependencies in a gx release commit (also, try to avoid multiple releases in a single PR, it gets a bit messy).

@Stebalien Stebalien merged commit 296ae64 into master Feb 1, 2018
@ghost ghost removed the in progress label Feb 1, 2018
@Stebalien Stebalien deleted the fix/windows-tests-utils branch February 1, 2018 05:52
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants