Skip to content
Open
Changes from 1 commit
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
195d9af
Locate docker and docker-compose using the path variable.
Mar 1, 2017
ab078a6
Merge branch 'feature/use-path-to-find-executables' of https://github…
hpryce Mar 7, 2017
a12076d
Reintroduce support for explicitly setting docker-compose location.
hpryce Mar 7, 2017
35ab870
Docker for Mac is not in the path when tests run from IDE.
hpryce Mar 7, 2017
252a88e
Split out finding possible command locations from testing those locat…
hpryce Mar 7, 2017
0a61921
Add jsr dep
hpryce Mar 7, 2017
d39fb31
Refactor to simply logic and improve test coverage by using Environme…
hpryce Mar 8, 2017
19791dd
Add case for Windows path variable "Path"
hpryce Mar 8, 2017
a734f16
Process builder will look for command on the path
hpryce Mar 8, 2017
215f427
Move integ tests into separate source set.
hpryce Mar 8, 2017
a8ce98b
Add very simple windows smoke test.
hpryce Mar 8, 2017
cc06e21
Wire up smoke test for Windows to appveyor.
hpryce Mar 9, 2017
186aba0
Thread.sleep isn't accurate on Windows
hpryce Mar 9, 2017
ed0d9cf
Simply don't run the tes that relies upon Thread.sleep on Windows
hpryce Mar 9, 2017
17a0b3b
Merge branch 'feature/look_in_path' into feature/windows_smoke_tests
hpryce Mar 9, 2017
bc6bdd9
Do we have the latest image?
hpryce Mar 10, 2017
1df8a38
Use Windows Server 2016 image
hpryce Mar 10, 2017
e903dac
Install docker-compose before running tests that need it
hpryce Mar 10, 2017
8c41711
Use image with more up to date docker
hpryce Mar 10, 2017
479efca
Correct appveyor.yml syntax
hpryce Mar 10, 2017
9492fb4
Try cinst
hpryce Mar 10, 2017
eafa3b0
Try installing both docker and docker-compose on old image
hpryce Mar 10, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Thread.sleep isn't accurate on Windows
  • Loading branch information
hpryce committed Mar 9, 2017
commit 186aba08b5edae172a233c814ef9dd205aee18cc
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,20 @@ public void should_not_pause_after_last_failure() throws Exception {

@Test
public void retryer_should_wait_after_failure_before_trying_again() throws Exception {
// Force Windows to use more granular sleeps - see http://stackoverflow.com/questions/824110/accurate-sleep-for-java-on-windows
new Thread(() -> {
try {
Thread.sleep(Long.MAX_VALUE);
} catch (InterruptedException e) {
// Ignore
}
}).start();

Retryer timeRetryer = new Retryer(1, Duration.millis(100));

Stopwatch stopwatch = Stopwatch.createStarted();
when(operation.call()).thenThrow(new DockerExecutionException()).thenAnswer(i -> {
assertThat(stopwatch.elapsed(TimeUnit.MILLISECONDS), greaterThan(100L));
assertThat(stopwatch.elapsed(TimeUnit.MILLISECONDS), greaterThan(98L));
return "success";
});

Expand Down