Skip to content

Commit 99c21c4

Browse files
committed
[ZEPPELIN-1455] Fix flaky test: AbstractAngularElemTest
### What is this PR for? This PR fix flaky test [ZEPPELIN-1455](https://issues.apache.org/jira/browse/ZEPPELIN-1455). According to http://doc.scalatest.org/1.8/org/scalatest/concurrent/Eventually.html, default timeout of eventually is 150millisecond. Set enough timeout for the test. ### What type of PR is it? Hot Fix ### Todos * [x] - increase timeout ### What is the Jira issue? https://issues.apache.org/jira/browse/ZEPPELIN-1455 ### Questions: * Does the licenses files need update? no * Is there breaking changes for older versions? no * Does this needs documentation? no Author: Lee moon soo <[email protected]> Closes #1920 from Leemoonsoo/ZEPPELIN-1455 and squashes the following commits: 13a993d [Lee moon soo] Increase tolerance of eventually
1 parent f604dff commit 99c21c4

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

zeppelin-display/src/test/scala/org/apache/zeppelin/display/angular/AbstractAngularElemTest.scala

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ import org.apache.zeppelin.display.{AngularObject, AngularObjectRegistry, GUI}
2323
import org.apache.zeppelin.interpreter._
2424
import org.apache.zeppelin.user.AuthenticationInfo
2525
import org.scalatest.concurrent.Eventually
26+
import org.scalatest.time.{Seconds, Span}
2627
import org.scalatest.{BeforeAndAfter, BeforeAndAfterEach, FlatSpec, Matchers}
2728

2829
/**
@@ -61,12 +62,12 @@ trait AbstractAngularElemTest
6162
// click create thread for callback function to run. So it'll may not immediately invoked
6263
// after click. therefore eventually should be
6364
click(elem)
64-
eventually {
65+
eventually (timeout(Span(5, Seconds))) {
6566
a should be(1)
6667
}
6768

6869
click(elem)
69-
eventually {
70+
eventually (timeout(Span(5, Seconds))) {
7071
a should be(2)
7172
}
7273

@@ -120,7 +121,7 @@ trait AbstractAngularElemTest
120121

121122
click(elem)
122123

123-
eventually { modelValue should be("value")}
124+
eventually (timeout(Span(5, Seconds))) { modelValue should be("value")}
124125
}
125126

126127

0 commit comments

Comments
 (0)