Skip to content

Commit 34fbfe3

Browse files
authored
fix: SampleTests: customAttributeSampleTest (#2411)
1 parent 9612e8b commit 34fbfe3

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

jobs/v3/src/test/java/SampleTests.java

+8
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939
public class SampleTests {
4040

4141
private static ByteArrayOutputStream bout;
42+
private long timeInMillis;
4243

4344
@BeforeClass
4445
public static void setUp() {
@@ -111,6 +112,13 @@ public void commuteSearchSampleTest() throws Exception {
111112
@Test
112113
public void customAttributeSampleTest() throws Exception {
113114
CustomAttributeSample.main();
115+
116+
// wait for 10 seconds to elapse and then run it.
117+
timeInMillis = System.currentTimeMillis();
118+
while (System.currentTimeMillis() < timeInMillis + 10000) {
119+
Thread.sleep(1000);
120+
}
121+
114122
assertThat(bout.toString())
115123
.containsMatch(
116124
".*Job created:.*jobWithACustomAttribute.*\n"

0 commit comments

Comments
 (0)