Skip to content

Commit 8f62afa

Browse files
committed
stamp: run unit tests for deno_runtime serially
1 parent 151004c commit 8f62afa

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

crates/base/src/deno_runtime.rs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -522,6 +522,7 @@ mod test {
522522
MainWorkerRuntimeOpts, UserWorkerMsgs, UserWorkerRuntimeOpts, WorkerContextInitOpts,
523523
WorkerRuntimeOpts,
524524
};
525+
use serial_test::serial;
525526
use std::collections::HashMap;
526527
use std::fs;
527528
use std::fs::File;
@@ -532,6 +533,7 @@ mod test {
532533
use tokio::sync::{mpsc, watch};
533534

534535
#[tokio::test]
536+
#[serial]
535537
async fn test_module_code_no_eszip() {
536538
let (worker_pool_tx, _) = mpsc::unbounded_channel::<UserWorkerMsgs>();
537539
let mut rt = DenoRuntime::new(WorkerContextInitOpts {
@@ -559,6 +561,7 @@ mod test {
559561
}
560562

561563
#[tokio::test]
564+
#[serial]
562565
#[allow(clippy::arc_with_non_send_sync)]
563566
async fn test_eszip_with_source_file() {
564567
let (worker_pool_tx, _) = mpsc::unbounded_channel::<UserWorkerMsgs>();
@@ -616,6 +619,7 @@ mod test {
616619
}
617620

618621
#[tokio::test]
622+
#[serial]
619623
#[allow(clippy::arc_with_non_send_sync)]
620624
async fn test_create_eszip_from_graph() {
621625
let (worker_pool_tx, _) = mpsc::unbounded_channel::<UserWorkerMsgs>();
@@ -707,6 +711,7 @@ mod test {
707711

708712
// Main Runtime should have access to `EdgeRuntime`
709713
#[tokio::test]
714+
#[serial]
710715
async fn test_main_runtime_creation() {
711716
let mut runtime = create_runtime(None, None, None).await;
712717

@@ -726,6 +731,7 @@ mod test {
726731

727732
// User Runtime Should not have access to EdgeRuntime
728733
#[tokio::test]
734+
#[serial]
729735
async fn test_user_runtime_creation() {
730736
let mut runtime = create_runtime(
731737
None,
@@ -749,6 +755,7 @@ mod test {
749755
}
750756

751757
#[tokio::test]
758+
#[serial]
752759
async fn test_main_rt_fs() {
753760
let mut main_rt = create_runtime(None, Some(std::env::vars().collect()), None).await;
754761

@@ -798,6 +805,7 @@ mod test {
798805
// }
799806

800807
#[tokio::test]
808+
#[serial]
801809
async fn test_os_ops() {
802810
let mut user_rt = create_runtime(
803811
None,
@@ -920,6 +928,7 @@ mod test {
920928
}
921929

922930
#[tokio::test]
931+
#[serial]
923932
async fn test_os_env_vars() {
924933
std::env::set_var("Supa_Test", "Supa_Value");
925934
let mut main_rt = create_runtime(None, Some(std::env::vars().collect()), None).await;
@@ -1016,6 +1025,7 @@ mod test {
10161025
}
10171026

10181027
#[tokio::test]
1028+
#[serial]
10191029
async fn test_read_file_user_rt() {
10201030
let mut user_rt = create_basic_user_runtime("./test_cases/readFile", 20, 1000).await;
10211031
let (_tx, unix_stream_rx) =
@@ -1033,6 +1043,7 @@ mod test {
10331043
}
10341044

10351045
#[tokio::test]
1046+
#[serial]
10361047
async fn test_array_buffer_allocation_below_limit() {
10371048
let mut user_rt = create_basic_user_runtime("./test_cases/array_buffers", 20, 1000).await;
10381049
let (_tx, unix_stream_rx) =
@@ -1042,6 +1053,7 @@ mod test {
10421053
}
10431054

10441055
#[tokio::test]
1056+
#[serial]
10451057
async fn test_array_buffer_allocation_above_limit() {
10461058
let mut user_rt = create_basic_user_runtime("./test_cases/array_buffers", 15, 1000).await;
10471059
let (_tx, unix_stream_rx) =

0 commit comments

Comments
 (0)