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

Ignore Tests Hanging in CI #3116

Merged
merged 2 commits into from
Jul 11, 2019
Merged

Ignore Tests Hanging in CI #3116

merged 2 commits into from
Jul 11, 2019

Conversation

rajadain
Copy link
Member

@rajadain rajadain commented Jul 2, 2019

Overview

As fallout from the Ubuntu Upgrade, testem hangs when running in CI mode. We have been unable to pinpoint the source of this error, so to stop CI from hanging every time we add a flag to skip the tests and configure CI with it.

Inspired by OpenTreeMap/otm-cloud#227

Connects #3110

Demo

Using the env command to set inline environment variables for the fish shell:

> env MMW_SKIP_JS_TESTS=True kj test

+ vagrant ssh app -c 'flake8 /opt/app/apps --exclude migrations || echo flake8 check failed'
Connection to 127.0.0.1 closed.
+ vagrant ssh app -c 'cd /opt/app && envdir /etc/mmw.d/env ./manage.py test --noinput'
Creating test database for alias 'default'...
Got an error creating the test database: database "test_mmw" already exists

Destroying old test database 'default'...
.Not Found: /project/2/clone
.Not Found: /project/3/
.......Not Found: /project/9/clone
.Not Found: /project/10/
..................Not Found: /api/boundary-layers/foo/1234
..........................................................
----------------------------------------------------------------------
Ran 86 tests in 21.413s

OK
Destroying test database for alias 'default'...
Connection to 127.0.0.1 closed.
+ [[ -z True ]]
+ echo 'SKIPPING JS TESTS'
SKIPPING JS TESTS

Notes

Created #3115 for upgrading the tests so that they run on CI again.

Testing Instructions

Checklist

  • All JavaScript tests pass ./scripts/testem.sh

As fallout from the Ubuntu Upgrade, testem hangs when running in
CI mode. We have been unable to pinpoint the source of this error,
so to stop CI from hanging every time we add a flag to skip the
tests and configure CI with it.

Inspired by https://github.com/OpenTreeMap/otm-cloud/pull/227
Since the tests have been disabled in CI, we add a checklist
item in the Pull Request Template to remind developers to
manually run the tests.
@hectcastro
Copy link
Contributor

@azavea-bot rebuild

@hectcastro
Copy link
Contributor

I tested MMW_SKIP_JS_TESTS by updating the configuration for PR builds in http://civicci01.internal.azavea.com/job/model-my-watershed-pull-requests/4046/console.

Copy link
Contributor

@mmcfarland mmcfarland left a comment

Choose a reason for hiding this comment

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

Tested toggling the environment var and confirming that the tests were or were not run as appropriate. The related Jenkins jobs also appear to have been updated correctly. 👍

@mmcfarland mmcfarland assigned rajadain and unassigned mmcfarland Jul 3, 2019
@rajadain rajadain merged commit f1ba261 into develop Jul 11, 2019
@rajadain rajadain deleted the tt/ignore-ci-tests-hanging branch July 11, 2019 17:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants