Skip to content

Commit

Permalink
Ignore failed killings of already dead containers
Browse files Browse the repository at this point in the history
  • Loading branch information
oblador committed Oct 31, 2023
1 parent 02c143c commit 52be4e7
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 10 deletions.
7 changes: 1 addition & 6 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,6 @@ name: Tests

on:
push:
branches:
- master
pull_request:
branches:
- master

jobs:
unit:
Expand All @@ -23,7 +18,7 @@ jobs:
- name: Install dependencies
run: yarn --frozen-lockfile --non-interactive --silent --ignore-scripts
- name: Prepare docker
run: docker pull yukinying/chrome-headless-browser-stable:100.0.4896.127
run: docker pull yukinying/chrome-headless-browser-stable:118.0.5993.117
- name: Run unit tests
run: yarn test-ci

Expand Down
2 changes: 1 addition & 1 deletion docs/command-line-arguments.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ yarn loki test -- --port 9009
| **`--chromeAwsLambdaFunctionName`** | Name of the use to capture screenshots. | `loki` |
| **`--chromeAwsLambdaRetries`** | The number of retries for invoking the lambda, in case of failure. | `0` |
| **`--chromeConcurrency`** | How many stories to test in parallel when using chrome | `4` |
| **`--chromeDockerImage`** | What docker image to use when running chrome | `yukinying/chrome-headless-browser-stable:100.0.4896.127` |
| **`--chromeDockerImage`** | What docker image to use when running chrome | `yukinying/chrome-headless-browser-stable:118.0.5993.117` |
| **`--chromeDockerWithoutSeccomp`** | Run chrome docker without custom seccomp settings. | `false` |
| **`--chromeDockerUseCopy`** | Use docker copy instead of volume mount for local stories | `false` |
| **`--chromeEnableAnimations`** | Enable CSS transitions and animations. | `false` |
Expand Down
2 changes: 1 addition & 1 deletion packages/runner/src/commands/test/default-options.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"chromeAwsLambdaBatchSize": "1",
"chromeAwsLambdaBatchConcurrency": "1",
"chromeConcurrency": "4",
"chromeDockerImage": "yukinying/chrome-headless-browser-stable:100.0.4896.127",
"chromeDockerImage": "yukinying/chrome-headless-browser-stable:118.0.5993.117",
"chromeFlags": "--headless --disable-gpu --hide-scrollbars",
"chromeLoadTimeout": "60000",
"chromeRetries": "0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,13 @@ function createChromeDockerTarget({
async function stop() {
if (dockerId) {
debug(`Killing chrome docker instance with id ${dockerId}`);
await execute(dockerPath, ['kill', dockerId]);
try {
await execute(dockerPath, ['kill', dockerId]);
} catch (e) {
if (e.toString().indexOf('No such container') === -1) {
throw e;
}
}
} else {
debug('No chrome docker instance to kill');
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ const storybook = [

describe('createChromeTarget', () => {
describe('.getStorybook', () => {
it(
it.only(

Check failure on line 92 in packages/target-chrome-docker/src/create-chrome-docker-target.spec.js

View workflow job for this annotation

GitHub Actions / Static analysis

Unexpected focused test
'fetches stories from webpack dynamic bundles',
async () => {
expect(await fetchStorybookFixture('dynamic')).toEqual(storybook);
Expand Down

0 comments on commit 52be4e7

Please sign in to comment.