summaryrefslogtreecommitdiff
path: root/cli/tests/integration/mod.rs
diff options
context:
space:
mode:
authorRyan Dahl <ry@tinyclouds.org>2021-08-11 17:38:07 +0200
committerGitHub <noreply@github.com>2021-08-11 17:38:07 +0200
commitcd323612fd694bc173b069b7b4125e28e02cc4c3 (patch)
treecec9adca8c80336f4a7aa654f6722034e1dcd5ef /cli/tests/integration/mod.rs
parent15a763152f9d392cb80692262f8de5ef8ae15495 (diff)
mark cafile tests as flaky (#11649)
Diffstat (limited to 'cli/tests/integration/mod.rs')
-rw-r--r--cli/tests/integration/mod.rs35
1 files changed, 25 insertions, 10 deletions
diff --git a/cli/tests/integration/mod.rs b/cli/tests/integration/mod.rs
index 1d6555ff7..8448e77e1 100644
--- a/cli/tests/integration/mod.rs
+++ b/cli/tests/integration/mod.rs
@@ -30,6 +30,21 @@ macro_rules! itest(
}
);
+#[macro_export]
+macro_rules! itest_flaky(
+($name:ident {$( $key:ident: $value:expr,)*}) => {
+ #[flaky_test::flaky_test]
+ fn $name() {
+ (test_util::CheckOutputIntegrationTest {
+ $(
+ $key: $value,
+ )*
+ .. Default::default()
+ }).run()
+ }
+}
+);
+
// These files have `_tests.rs` suffix to make it easier to tell which file is
// the test (ex. `lint_tests.rs`) and which is the implementation (ex. `lint.rs`)
// when both are open, especially for two tabs in VS Code
@@ -445,39 +460,39 @@ fn broken_stdout() {
assert!(!stderr.contains("panic"));
}
-itest!(cafile_url_imports {
+itest_flaky!(cafile_url_imports {
args: "run --quiet --reload --cert tls/RootCA.pem cafile_url_imports.ts",
output: "cafile_url_imports.ts.out",
http_server: true,
});
-itest!(cafile_ts_fetch {
+itest_flaky!(cafile_ts_fetch {
args:
"run --quiet --reload --allow-net --cert tls/RootCA.pem cafile_ts_fetch.ts",
output: "cafile_ts_fetch.ts.out",
http_server: true,
});
-itest!(cafile_eval {
+itest_flaky!(cafile_eval {
args: "eval --cert tls/RootCA.pem fetch('https://localhost:5545/cafile_ts_fetch.ts.out').then(r=>r.text()).then(t=>console.log(t.trimEnd()))",
output: "cafile_ts_fetch.ts.out",
http_server: true,
});
-itest!(cafile_info {
+itest_flaky!(cafile_info {
args:
"info --quiet --cert tls/RootCA.pem https://localhost:5545/cafile_info.ts",
output: "cafile_info.ts.out",
http_server: true,
});
-itest!(cafile_url_imports_unsafe_ssl {
+itest_flaky!(cafile_url_imports_unsafe_ssl {
args: "run --quiet --reload --unsafely-ignore-certificate-errors=localhost cafile_url_imports.ts",
output: "cafile_url_imports_unsafe_ssl.ts.out",
http_server: true,
});
-itest!(cafile_ts_fetch_unsafe_ssl {
+itest_flaky!(cafile_ts_fetch_unsafe_ssl {
args:
"run --quiet --reload --allow-net --unsafely-ignore-certificate-errors cafile_ts_fetch.ts",
output: "cafile_ts_fetch_unsafe_ssl.ts.out",
@@ -498,7 +513,7 @@ itest!(localhost_unsafe_ssl {
exit_code: 1,
});
-#[test]
+#[flaky_test::flaky_test]
fn cafile_env_fetch() {
use deno_core::url::Url;
let _g = util::http_server();
@@ -517,7 +532,7 @@ fn cafile_env_fetch() {
assert!(output.status.success());
}
-#[test]
+#[flaky_test::flaky_test]
fn cafile_fetch() {
use deno_core::url::Url;
let _g = util::http_server();
@@ -539,7 +554,7 @@ fn cafile_fetch() {
assert_eq!(out, "");
}
-#[test]
+#[flaky_test::flaky_test]
fn cafile_install_remote_module() {
let _g = util::http_server();
let temp_dir = TempDir::new().expect("tempdir fail");
@@ -581,7 +596,7 @@ fn cafile_install_remote_module() {
assert!(stdout.ends_with("foo"));
}
-#[test]
+#[flaky_test::flaky_test]
fn cafile_bundle_remote_exports() {
let _g = util::http_server();