summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAapo Alasuutari <aapo.alasuutari@gmail.com>2023-03-25 09:18:41 +0200
committerGitHub <noreply@github.com>2023-03-25 09:18:41 +0200
commit1c6b7973838df4526adaca6217458437a74e7530 (patch)
tree9f33f5a55304512013c202690f35bf55a0237b63
parent70e2e8f2dd740fcbe4c09cfc59915320b7c22be3 (diff)
test(ext/ffi): Increase timeout value in event loop integration test callback (#18394)
-rw-r--r--test_ffi/tests/event_loop_integration.ts6
1 files changed, 4 insertions, 2 deletions
diff --git a/test_ffi/tests/event_loop_integration.ts b/test_ffi/tests/event_loop_integration.ts
index 55dc563bb..593841948 100644
--- a/test_ffi/tests/event_loop_integration.ts
+++ b/test_ffi/tests/event_loop_integration.ts
@@ -44,7 +44,7 @@ const tripleLogCallback = () => {
callback.ref();
dylib.symbols.call_stored_function_thread_safe_and_log();
}
- }, 10);
+ }, 100);
};
const callback = Deno.UnsafeCallback.threadSafe(
@@ -60,11 +60,12 @@ dylib.symbols.store_function(callback.pointer);
// Synchronous callback logging
console.log("SYNCHRONOUS");
+// This function only calls the callback, and does not log.
dylib.symbols.call_stored_function();
console.log("STORED_FUNCTION called");
// Wait to make sure synch logging and async logging
-await new Promise((res) => setTimeout(res, 100));
+await new Promise((res) => setTimeout(res, 200));
// Ref once to make sure both `queueMicrotask()` and `setTimeout()`
// must resolve and unref before isolate exists.
@@ -73,4 +74,5 @@ callback.ref();
console.log("THREAD SAFE");
retry = true;
+// This function calls the callback and logs 'STORED_FUNCTION called'
dylib.symbols.call_stored_function_thread_safe_and_log();