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

DEV: suppress assets logs from qunit tests #13871

Merged
merged 1 commit into from Jul 28, 2021

Conversation

jjaffeux
Copy link
Contributor

@jjaffeux jjaffeux commented Jul 28, 2021

Partially reverts: 956f849

Note that this way of running tests will soon be deprecated in favor of ember test and this shouldn’t matter anymore.

@jjaffeux jjaffeux requested review from CvX and eviltrout July 28, 2021 09:42
@jjaffeux
Copy link
Contributor Author

jjaffeux commented Jul 28, 2021

That's a simple change, but I tried more things than am willing to admit before getting to this 😅 (a custom logger might have been written at some point)

@CvX
Copy link
Contributor

CvX commented Jul 28, 2021

You will still get flooded by 404s when running tests in a non-headless browser. And let's hope no code/test depends on img.onload since that won't trigger with images disabled. 😉

@jjaffeux
Copy link
Contributor Author

You will still get flooded by 404s when running tests in a non-headless browser. And let's hope no code/test depends on img.onload since that won't trigger with images disabled. 😉

yes but this is mostly annoying on CI and we don't have any test failing from this so far

@jjaffeux
Copy link
Contributor Author

You will still get flooded by 404s when running tests in a non-headless browser. And let's hope no code/test depends on img.onload since that won't trigger with images disabled. 😉

Well of course... one plugin does...

Test Errors

Test Failed: getMetadata - image file
Assertion Failed: Test took longer than 10000ms; test timed out.
at eval (lib/uploads-test:10:19)
at obj (discourse-loader:366:31)
at tryFinally (discourse-loader:190:14)
at require (discourse-loader:363:5)
at eval (discourse/tests/setup-tests:256:9)
at Array.forEach ()
at setupTestsCommon (discourse/tests/setup-tests:246:36)

@jjaffeux
Copy link
Contributor Author

Well ok I will go other way and just remove logging...

Partially reverts: discourse@956f849

Note that this way of running tests will soon be deprecated in favor of `ember test` and this shouldn’t matter anymore.
@jjaffeux jjaffeux changed the title DEV: disables images in headless chrome DEV: suppress assets logs from qunit tests Jul 28, 2021
@jjaffeux jjaffeux merged commit 1b64901 into discourse:main Jul 28, 2021
@jjaffeux jjaffeux deleted the disables-images-qunit branch July 28, 2021 12:27
tgxworld added a commit to tgxworld/discourse that referenced this pull request Jul 29, 2021
This reverts commit 1b64901.

Test is failing with the following message:

```
navigate to  http://localhost:60099/qunit?hidepassed=1&seed=312984199721107128645754962579661839397&qunit_disable_auto_start=1
2021-07-29T02:57:13.303Z - (type: network/error) message: Failed to load resource: the server responded with a status of 403 (Forbidden), url: http://localhost:60099/extra-locales/admin?v=eeeea38a700966a1a7fb600b23f3a222
2021-07-29T02:57:43.823Z - (type: network/error) message: Failed to load resource: net::ERR_EMPTY_RESPONSE, url: http://localhost:60099/assets/discourse/tests/test_helper.js
ReferenceError: define is not defined
    at eval (discourse/tests/acceptance/about-test:1:1)
    at http://localhost:60099/assets/discourse/tests/core_plugins_tests.js:1:1
ReferenceError: require is not defined
    at eval (discourse/tests/test_starter:5:24)
    at http://localhost:60099/assets/discourse/tests/test_starter.js:1:1
2021-07-29T02:57:43.891Z - (type: network/error) message: Failed to load resource: the server responded with a status of 403 (Forbidden), url: http://localhost:60099/extra-locales/admin?v=eeeea38a700966a1a7fb600b23f3a222

Tests timed out
```
tgxworld added a commit that referenced this pull request Jul 29, 2021
This reverts commit 1b64901.

Test is failing with the following message:

```
navigate to  http://localhost:60099/qunit?hidepassed=1&seed=312984199721107128645754962579661839397&qunit_disable_auto_start=1
2021-07-29T02:57:13.303Z - (type: network/error) message: Failed to load resource: the server responded with a status of 403 (Forbidden), url: http://localhost:60099/extra-locales/admin?v=eeeea38a700966a1a7fb600b23f3a222
2021-07-29T02:57:43.823Z - (type: network/error) message: Failed to load resource: net::ERR_EMPTY_RESPONSE, url: http://localhost:60099/assets/discourse/tests/test_helper.js
ReferenceError: define is not defined
    at eval (discourse/tests/acceptance/about-test:1:1)
    at http://localhost:60099/assets/discourse/tests/core_plugins_tests.js:1:1
ReferenceError: require is not defined
    at eval (discourse/tests/test_starter:5:24)
    at http://localhost:60099/assets/discourse/tests/test_starter.js:1:1
2021-07-29T02:57:43.891Z - (type: network/error) message: Failed to load resource: the server responded with a status of 403 (Forbidden), url: http://localhost:60099/extra-locales/admin?v=eeeea38a700966a1a7fb600b23f3a222

Tests timed out
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants