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

Revamp Closure JsUnit tests runtime and optimize test/build flows. #1137

Merged
merged 1 commit into from
Sep 21, 2021
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
2 changes: 2 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
**/node_modules
packages/grpc-web/generated
14 changes: 5 additions & 9 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,9 @@
version: '3'
services:
common:
build:
context: ./
dockerfile: ./net/grpc/gateway/docker/common/Dockerfile
image: grpcweb/common
prereqs:
build:
context: ./
dockerfile: ./net/grpc/gateway/docker/prereqs/Dockerfile
depends_on:
- common
image: grpcweb/prereqs
echo-server:
build:
Expand All @@ -34,8 +27,6 @@ services:
build:
context: ./
dockerfile: ./net/grpc/gateway/docker/node_interop_server/Dockerfile
depends_on:
- common
image: grpcweb/node-interop-server
ports:
- "7074:7074"
Expand Down Expand Up @@ -114,3 +105,8 @@ services:
depends_on:
- prereqs
image: grpcweb/protoc-plugin
jsunit-test:
build:
context: ./
dockerfile: ./packages/grpc-web/docker/jsunit-test/Dockerfile
image: grpcweb/jsunit-test
48 changes: 1 addition & 47 deletions javascript/net/grpc/web/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
load("@io_bazel_rules_closure//closure:defs.bzl", "closure_js_library", "closure_js_test")
load("@io_bazel_rules_closure//closure:defs.bzl", "closure_js_library")
load("@rules_cc//cc:defs.bzl", "cc_binary")

cc_binary(
Expand Down Expand Up @@ -239,49 +239,3 @@ closure_js_library(
],
visibility = ["//visibility:public"],
)

closure_js_test(
name = "grpcwebclientbase_test",
srcs = [
"grpcwebclientbase_test.js",
],
entry_points = [
"goog:grpc.web.GrpcWebClientBaseTest",
],
suppress = [
"visibility",
"checkTypes",
"deprecated",
"reportUnknownTypes",
"strictCheckTypes",
],
deps = [
":clientreadablestream",
":grpcwebclientbase",
":interceptor",
"@io_bazel_rules_closure//closure/library/crypt:base64",
"@io_bazel_rules_closure//closure/library/events",
"@io_bazel_rules_closure//closure/library/net:eventtype",
"@io_bazel_rules_closure//closure/library/structs:map",
"@io_bazel_rules_closure//closure/library/testing:jsunit",
"@io_bazel_rules_closure//closure/library/testing:testsuite",
],
)

closure_js_test(
name = "grpcwebstreamparser_test",
srcs = [
"grpcwebstreamparser_test.js",
],
entry_points = [
"goog:grpc.web.GrpcWebStreamParserTest",
],
suppress = [
"reportUnknownTypes",
],
deps = [
":grpcwebstreamparser",
"@io_bazel_rules_closure//closure/library/testing:jsunit",
"@io_bazel_rules_closure//closure/library/testing:testsuite",
],
)
7 changes: 7 additions & 0 deletions javascript/net/grpc/web/grpcwebclientbase_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,13 @@ class MockXhr {
}
}

/**
* @param {number} ms
*/
setTimeoutInterval(ms) {
return;
}

/**
* @param {boolean} withCredentials
*/
Expand Down
Loading