Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[nfc] lower test timeouts #2583

Merged
merged 2 commits into from
Aug 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions .bazelrc
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
common --enable_platform_specific_config
build --verbose_failures
build --build_tag_filters=-off-by-default,-slow
test --test_tag_filters=-off-by-default,-slow
build --build_tag_filters=-off-by-default
test --test_tag_filters=-off-by-default
# exclude enormous tests by default
build --test_size_filters=-enormous

# use lower test timeouts: https://bazel.build/reference/test-encyclopedia#role-test-runner
# corresponds to small,medium,large,enormous tests (medium is default)
build --test_timeout=1,15,60,240

# Not using bzlmod for dependencies yet
common --noenable_bzlmod
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ jobs:
run: |
cat <<EOF >> .bazelrc
build --build_tag_filters=-off-by-default
test --test_tag_filters=-off-by-default
test --test_tag_filters=-off-by-default --test_size_filters=small,medium,large,enormous
EOF
- name: Generate list of excluded Bazel targets
# Exclude large benchmarking binaries created in debug and asan configurations to avoid
Expand Down
1 change: 1 addition & 0 deletions src/cloudflare/internal/test/ai/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ wd_test(
)

wd_test(
size = "large",
src = "python-ai-api-test.wd-test",
args = ["--experimental"],
data = glob([
Expand Down
1 change: 1 addition & 0 deletions src/cloudflare/internal/test/d1/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ wd_test(
)

wd_test(
size = "large",
src = "python-d1-api-test.wd-test",
args = ["--experimental"],
data = glob([
Expand Down
1 change: 1 addition & 0 deletions src/cloudflare/internal/test/vectorize/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ wd_test(
)

wd_test(
size = "large",
src = "python-vectorize-api-test.wd-test",
data = glob([
"*.py",
Expand Down
127 changes: 121 additions & 6 deletions src/workerd/api/node/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,125 @@ kj_test(
deps = ["//src/workerd/tests:test-fixture"],
)

[wd_test(
src = f,
wd_test(
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

some tests are large, so rather than deal with excludes I expanded this. Hope you don't mind @anonrig

src = "tests/assert-test.wd-test",
args = ["--experimental"],
data = [f.removesuffix(".wd-test") + ".js"],
) for f in glob(
["**/*.wd-test"],
)]
data = ["tests/assert-test.js"],
)

wd_test(
size = "large",
src = "tests/buffer-nodejs-test.wd-test",
args = ["--experimental"],
data = ["tests/buffer-nodejs-test.js"],
)

wd_test(
size = "enormous",
src = "tests/crypto_dh-test.wd-test",
args = ["--experimental"],
data = ["tests/crypto_dh-test.js"],
)

wd_test(
src = "tests/crypto_hash-test.wd-test",
args = ["--experimental"],
data = ["tests/crypto_hash-test.js"],
)

wd_test(
src = "tests/crypto_hkdf-test.wd-test",
args = ["--experimental"],
data = ["tests/crypto_hkdf-test.js"],
)

wd_test(
src = "tests/crypto_hmac-test.wd-test",
args = ["--experimental"],
data = ["tests/crypto_hmac-test.js"],
)

wd_test(
src = "tests/crypto_keys-test.wd-test",
args = ["--experimental"],
data = ["tests/crypto_keys-test.js"],
)

wd_test(
src = "tests/crypto_pbkdf2-test.wd-test",
args = ["--experimental"],
data = ["tests/crypto_pbkdf2-test.js"],
)

wd_test(
src = "tests/crypto_random-test.wd-test",
args = ["--experimental"],
data = ["tests/crypto_random-test.js"],
)

wd_test(
src = "tests/crypto_scrypt-test.wd-test",
args = ["--experimental"],
data = ["tests/crypto_scrypt-test.js"],
)

wd_test(
src = "tests/crypto_spkac-test.wd-test",
args = ["--experimental"],
data = ["tests/crypto_spkac-test.js"],
)

wd_test(
src = "tests/crypto_x509-test.wd-test",
args = ["--experimental"],
data = ["tests/crypto_x509-test.js"],
)

wd_test(
src = "tests/diagnostics-channel-test.wd-test",
args = ["--experimental"],
data = ["tests/diagnostics-channel-test.js"],
)

wd_test(
src = "tests/mimetype-test.wd-test",
args = ["--experimental"],
data = ["tests/mimetype-test.js"],
)

wd_test(
src = "tests/node-compat-v2-test.wd-test",
args = ["--experimental"],
data = ["tests/node-compat-v2-test.js"],
)

wd_test(
src = "tests/path-test.wd-test",
args = ["--experimental"],
data = ["tests/path-test.js"],
)

wd_test(
size = "large",
src = "tests/streams-test.wd-test",
args = ["--experimental"],
data = ["tests/streams-test.js"],
)

wd_test(
src = "tests/string-decoder-test.wd-test",
args = ["--experimental"],
data = ["tests/string-decoder-test.js"],
)

wd_test(
src = "tests/util-nodejs-test.wd-test",
args = ["--experimental"],
data = ["tests/util-nodejs-test.js"],
)

wd_test(
src = "tests/zlib-nodejs-test.wd-test",
args = ["--experimental"],
data = ["tests/zlib-nodejs-test.js"],
)
2 changes: 1 addition & 1 deletion src/workerd/server/tests/compile-tests/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
sh_test(
name = "helloworld_compile_test",
size = "small",
size = "medium",
srcs = ["compile-test.sh"],
args = [
"$(location //src/workerd/server:workerd)",
Expand Down
1 change: 1 addition & 0 deletions src/workerd/server/tests/inspector/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ load("@aspect_rules_js//js:defs.bzl", "js_test")

js_test(
name = "inspector-test",
size = "large",
data = [
":config.capnp",
":index.mjs",
Expand Down
3 changes: 1 addition & 2 deletions src/workerd/server/tests/python/import_tests.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -44,18 +44,17 @@ def gen_import_tests(to_test):
name = worker_py_fname + "@rule",
out = worker_py_fname,
content = [generate_import_py_file(to_test[lib])],
tags = ["slow"],
)
write_file(
name = wd_test_fname + "@rule",
out = wd_test_fname,
content = [generate_wd_test_file(lib)],
tags = ["slow"],
)

py_wd_test(
src = wd_test_fname,
args = ["--experimental", "--pyodide-package-disk-cache-dir", "../all_pyodide_wheels"],
data = [worker_py_fname, "@all_pyodide_wheels//:whls"],
tags = ["slow"],
size = "enormous",
)
Loading