Skip to content

Commit ad8b477

Browse files
committed
Add more margin to timer test
1 parent b18ccfd commit ad8b477

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

java_runtime/tests/classes/java/util/test_timer.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ async fn test_timer() -> Result<()> {
5454
.invoke_virtual(&timer, "schedule", "(Ljava/util/TimerTask;JJ)V", (test_class.clone(), 100i64, 0i64))
5555
.await?;
5656

57-
let _: () = jvm.invoke_static("java/lang/Thread", "sleep", "(J)V", (200i64,)).await?;
57+
let _: () = jvm.invoke_static("java/lang/Thread", "sleep", "(J)V", (500i64,)).await?;
5858
let run_count: i32 = jvm.get_field(&test_class, "runCount", "I").await?;
5959
assert_eq!(run_count, 1);
6060

@@ -67,7 +67,7 @@ async fn test_timer() -> Result<()> {
6767
)
6868
.await?;
6969

70-
let _: () = jvm.invoke_static("java/lang/Thread", "sleep", "(J)V", (200i64,)).await?;
70+
let _: () = jvm.invoke_static("java/lang/Thread", "sleep", "(J)V", (500i64,)).await?;
7171
let run_count: i32 = jvm.get_field(&test_class, "runCount", "I").await?;
7272
assert_eq!(run_count, 2);
7373

0 commit comments

Comments
 (0)