From 07610d94119154ea922df92bbde759bbc2012533 Mon Sep 17 00:00:00 2001 From: Micha de Vries Date: Sat, 20 Jul 2024 15:21:01 +0200 Subject: [PATCH] Fix flaky test (#4397) --- lib/tests/function.rs | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/lib/tests/function.rs b/lib/tests/function.rs index bb7d683f..70f91ab3 100644 --- a/lib/tests/function.rs +++ b/lib/tests/function.rs @@ -2957,11 +2957,11 @@ async fn function_rand_ulid() -> Result<(), Error> { async fn function_rand_ulid_from_datetime() -> Result<(), Error> { let sql = r#" CREATE ONLY test:[rand::ulid()] SET created = time::now(), num = 1; - SLEEP 1ms; + SLEEP 100ms; LET $rec = CREATE ONLY test:[rand::ulid()] SET created = time::now(), num = 2; - SLEEP 1ms; + SLEEP 100ms; CREATE ONLY test:[rand::ulid()] SET created = time::now(), num = 3; - SELECT VALUE num FROM test:[rand::ulid($rec.created - 1ms)]..; + SELECT VALUE num FROM test:[rand::ulid($rec.created - 50ms)]..; "#; let mut test = Test::new(sql).await?; // @@ -3003,11 +3003,11 @@ async fn function_rand_uuid() -> Result<(), Error> { async fn function_rand_uuid_from_datetime() -> Result<(), Error> { let sql = r#" CREATE ONLY test:[rand::uuid()] SET created = time::now(), num = 1; - SLEEP 1ms; + SLEEP 100ms; LET $rec = CREATE ONLY test:[rand::uuid()] SET created = time::now(), num = 2; - SLEEP 1ms; + SLEEP 100ms; CREATE ONLY test:[rand::uuid()] SET created = time::now(), num = 3; - SELECT VALUE num FROM test:[rand::uuid($rec.created - 1ms)]..; + SELECT VALUE num FROM test:[rand::uuid($rec.created - 50ms)]..; "#; let mut test = Test::new(sql).await?; // @@ -3062,11 +3062,11 @@ async fn function_rand_uuid_v7() -> Result<(), Error> { async fn function_rand_uuid_v7_from_datetime() -> Result<(), Error> { let sql = r#" CREATE ONLY test:[rand::uuid::v7()] SET created = time::now(), num = 1; - SLEEP 1ms; + SLEEP 100ms; LET $rec = CREATE ONLY test:[rand::uuid::v7()] SET created = time::now(), num = 2; - SLEEP 1ms; + SLEEP 100ms; CREATE ONLY test:[rand::uuid::v7()] SET created = time::now(), num = 3; - SELECT VALUE num FROM test:[rand::uuid::v7($rec.created - 1ms)]..; + SELECT VALUE num FROM test:[rand::uuid::v7($rec.created - 50ms)]..; "#; let mut test = Test::new(sql).await?; //