Skip to content

Commit

Permalink
fix(examples): fix karma config in examples/angular_bazel_architect
Browse files Browse the repository at this point in the history
Use ChromeHeadess as base instead of passing —headless. This fixes the CI failure on CircleCI and fixes it locally for me on OSX. buildkite macos still fails with

```
        # ==================== Test output for //:test:
        # 29 01 2020 23:31:42.804:INFO [karma-server]: Karma v4.1.0 server started at http://0.0.0.0:9876/
        # 29 01 2020 23:31:42.806:INFO [launcher]: Launching browsers ChromeHeadlessNoSandbox with concurrency unlimited
        # 29 01 2020 23:31:42.808:INFO [launcher]: Starting browser ChromeHeadless
        # 29 01 2020 23:32:42.815:WARN [launcher]: ChromeHeadless have not captured in 60000 ms, killing.
        # 29 01 2020 23:32:44.818:WARN [launcher]: ChromeHeadless was not killed in 2000 ms, sending SIGKILL.
        # 29 01 2020 23:32:46.822:WARN [launcher]: ChromeHeadless was not killed by SIGKILL in 2000 ms, continuing.
```

but this seems to be something to do with the buildkite machine chrome version/configuration as it does work locally on mac for me with Chrome 79. Disabled the test on using `no-bazelci-mac` tag.
  • Loading branch information
gregmagolan committed Jan 30, 2020
1 parent 6dc919d commit a4ca6f6
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 6 deletions.
15 changes: 14 additions & 1 deletion examples/angular_bazel_architect/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,20 @@ architect_test(
"@npm//karma-jasmine",
"@npm//karma-jasmine-html-reporter",
],
tags = ["browser:chromium-local"],
tags = [
"browser:chromium-local",
# This fails locally on macos buildkite trying to capture Chrome.
# Tested locally on OSX and it works so it is something to do with the
# buildkite osx machine chrome version/configuration.
# ==================== Test output for //:test:
# 29 01 2020 23:31:42.804:INFO [karma-server]: Karma v4.1.0 server started at http://0.0.0.0:9876/
# 29 01 2020 23:31:42.806:INFO [launcher]: Launching browsers ChromeHeadlessNoSandbox with concurrency unlimited
# 29 01 2020 23:31:42.808:INFO [launcher]: Starting browser ChromeHeadless
# 29 01 2020 23:32:42.815:WARN [launcher]: ChromeHeadless have not captured in 60000 ms, killing.
# 29 01 2020 23:32:44.818:WARN [launcher]: ChromeHeadless was not killed in 2000 ms, sending SIGKILL.
# 29 01 2020 23:32:46.822:WARN [launcher]: ChromeHeadless was not killed by SIGKILL in 2000 ms, continuing.
"no-bazelci-mac",
],
)

# Just a dummy test so that we have a test target for //... on certain bazelci platforms with bazel_integration_test
Expand Down
6 changes: 3 additions & 3 deletions examples/angular_bazel_architect/WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# See https://docs.bazel.build/versions/master/build-ref.html#workspace
workspace(
# How this workspace would be referenced with absolute labels from another workspace
name = "angular_cli_demo",
name = "angular_bazel_architect",
)

# Install the nodejs "bootstrap" package
Expand All @@ -12,8 +12,8 @@ load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")

http_archive(
name = "build_bazel_rules_nodejs",
sha256 = "3887b948779431ac443e6a64f31b9e1e17b8d386a31eebc53ec1d9b0a6cabd2b",
urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/1.2.0/rules_nodejs-1.2.0.tar.gz"],
sha256 = "ecaa54955b314b5e33948bd8f39e35c35ee89e905d8de1c03868100293510573",
urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/1.2.1/rules_nodejs-1.2.1.tar.gz"],
)

# The yarn_install rule runs yarn anytime the package.json or yarn.lock file changes.
Expand Down
4 changes: 2 additions & 2 deletions examples/angular_bazel_architect/karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ module.exports = function(config) {
autoWatch: true,
customLaunchers: {
ChromeHeadlessNoSandbox: {
base: 'Chrome',
flags: ['--no-sandbox', '--headless', '--disable-gpu', '--disable-dev-shm-usage']
base: 'ChromeHeadless',
flags: ['--no-sandbox', '--disable-gpu', '--disable-dev-shm-usage']
}
},
browsers: ['ChromeHeadlessNoSandbox'],
Expand Down

0 comments on commit a4ca6f6

Please sign in to comment.