Skip to content

Commit

Permalink
fix: SampleTests: customAttributeSampleTest (#2411)
Browse files Browse the repository at this point in the history
  • Loading branch information
munkhuushmgl authored Mar 13, 2020
1 parent 9612e8b commit 34fbfe3
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions jobs/v3/src/test/java/SampleTests.java
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
public class SampleTests {

private static ByteArrayOutputStream bout;
private long timeInMillis;

@BeforeClass
public static void setUp() {
Expand Down Expand Up @@ -111,6 +112,13 @@ public void commuteSearchSampleTest() throws Exception {
@Test
public void customAttributeSampleTest() throws Exception {
CustomAttributeSample.main();

// wait for 10 seconds to elapse and then run it.
timeInMillis = System.currentTimeMillis();
while (System.currentTimeMillis() < timeInMillis + 10000) {
Thread.sleep(1000);
}

assertThat(bout.toString())
.containsMatch(
".*Job created:.*jobWithACustomAttribute.*\n"
Expand Down

0 comments on commit 34fbfe3

Please sign in to comment.