apache / cordova-coho

Apache Cordova coho
Apache License 2.0
33 stars 62 forks source link

GH-195: Ensure synchronous operation #196

Closed oliversalzburg closed 6 years ago

oliversalzburg commented 6 years ago

Performing the read asynchronously introduces a race condition that can cause the changes to not have been made yet when they are checked by git.

This issue introduces random nightly build failures.

Fixes #195

Platforms affected

Jenkins

What does this PR do?

Fixes failing nightly builds.

What testing has been done on this change?

None.

Checklist

raphinesse commented 6 years ago

Looks like you need to adapt the spies in the test: https://github.com/apache/cordova-coho/blob/7bc1ce07b33cd30e0e90ed8afd35d2e6e1270da5/spec/versionutil.spec.js#L61

oliversalzburg commented 6 years ago

@raphinesse Should go green now

raphinesse commented 6 years ago

On a side note: OMG, these tests are horrible! :scream: :joy:

raphinesse commented 6 years ago

@dpogue Do we have to do something to make Jenkins use this?

dpogue commented 6 years ago

It should clone coho as the first step in the build

raphinesse commented 6 years ago

it('should clone coho as the first step in the build', () => {});

:grin:

Alright, then let's see what happens...