Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add fake time #147

Merged
merged 23 commits into from
Nov 6, 2017
Merged

Add fake time #147

merged 23 commits into from
Nov 6, 2017

Conversation

julianoes
Copy link
Collaborator

@julianoes julianoes commented Nov 1, 2017

In order to avoid sketchy unit test results on bursted or slow CI
machines, it makes sense to provide mocked time functionality.

This should fix the CI troubles introduced by #134.

Should fix #43 for good.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.3%) to 55.45% when pulling 8967560 on add-mock-time into 50a09fc on develop.

@julianoes
Copy link
Collaborator Author

Note to self. It should probably called fake time.

Also, this doesn't actually work yet because the fake is selected at compile time, however, the library is not compiled with the unit test flags but only the unit test part is. Therefore, part of the time API is still using the real time. Something like dependency injection could fix this.

In order to avoid sketchy unit test results on bursted or slow CI
machines, it makes sense to provide mocked time functionality.
Since the unit test depends on the already compiled library file, we
need to provide the functionality for the real and mocked time at
runtime.
The time has still an implementation is not just an API that responds as
expected, it is actually a fake and not a mock.
@julianoes julianoes changed the title Add mock time Add fake time Nov 2, 2017
@coveralls
Copy link

Coverage Status

Coverage decreased (-0.9%) to 54.194% when pulling 3c57e82 on add-mock-time into 50a09fc on develop.

@coveralls
Copy link

Coverage Status

Coverage decreased (-1.9%) to 53.233% when pulling 3c57e82 on add-mock-time into 50a09fc on develop.

@coveralls
Copy link

Coverage Status

Coverage decreased (-1.9%) to 53.233% when pulling e546c1c on add-mock-time into 50a09fc on develop.

This brings this project more inline with the usual way that a library
for Linux/Mac is built. The build is still static for Android, iOS, and
Windows in order not to break too much.

Also, we now link the library to curl and pthread instead of having to
link that later in each executable that depends on this library.
@coveralls
Copy link

Coverage Status

Coverage decreased (-37.6%) to 17.571% when pulling fc49906 on add-mock-time into 50a09fc on develop.

@coveralls
Copy link

Coverage Status

Coverage decreased (-37.6%) to 17.571% when pulling dd55567 on add-mock-time into 50a09fc on develop.

@coveralls
Copy link

Coverage Status

Coverage decreased (-37.6%) to 17.571% when pulling 2b8d549 on add-mock-time into 50a09fc on develop.

Somehow the dlls are not found unless you copy them to the folder where
you run the exe in.
- The Windows check was wrong.
- Since we swapped to dynamic, we link to .so.
@coveralls
Copy link

Coverage Status

Coverage decreased (-37.6%) to 17.571% when pulling aed9283 on add-mock-time into 50a09fc on develop.

@coveralls
Copy link

Coverage Status

Coverage decreased (-37.6%) to 17.571% when pulling fbf1917 on add-mock-time into 50a09fc on develop.

@coveralls
Copy link

Coverage Status

Coverage decreased (-37.6%) to 17.571% when pulling fbf1917 on add-mock-time into 50a09fc on develop.

@julianoes
Copy link
Collaborator Author

Note: I have local changes and an updated docker image for this that I could not push yet.

@julianoes
Copy link
Collaborator Author

I'm merging this now because I need to rebase other PRs on top of it that are failing because of the flaky unit tests.

@julianoes julianoes merged commit d4688a2 into develop Nov 6, 2017
@julianoes julianoes deleted the add-mock-time branch November 6, 2017 14:51
@julianoes julianoes mentioned this pull request Nov 6, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Intermittent CI fail
2 participants