-
Notifications
You must be signed in to change notification settings - Fork 323
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
update some tests to run in isolated workers using tap #2538
Conversation
Codecov Report
@@ Coverage Diff @@
## master #2538 +/- ##
==========================================
- Coverage 89.74% 87.29% -2.46%
==========================================
Files 291 294 +3
Lines 9958 9996 +38
==========================================
- Hits 8937 8726 -211
- Misses 1021 1270 +249
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
BenchmarksComparing candidate commit 8f9d9a9 in PR branch Found 1 performance improvements and 14 performance regressions! Performance is the same for 951 cases. scenario:plugin-bluebird-with-tracer-14
scenario:plugin-http-server-with-tracer-14
scenario:startup-control-everything-14
scenario:startup-with-tracer-everything-14
scenario:plugin-bluebird-with-tracer-16
scenario:startup-control-everything-16
scenario:startup-with-tracer-everything-16
scenario:startup-control-everything-18
scenario:startup-with-tracer-everything-18
|
@@ -402,7 +404,7 @@ describe('Overhead controller', () => { | |||
}) | |||
} | |||
|
|||
testInRequest(app, tests) | |||
() => testInRequest(app, tests) // TODO: re-enable when fixed with tap |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A bare arrow function is a pretty weird way to comment something out. Can you just use a normal comment here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, I was trying to avoid changing too many lines and came up with this, but I can comment out all the lines involved instead.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can't you just comment out this line?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
Lots of notes about things not working with this test runner. Is the plan to fix these before landing? Otherwise we should at least elaborate on why those tests are not working so it's clear what is involved in enabling them again. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are you sure we can't find a way to include the setup script automatically for every file ? using the NODE_ARGS
env var with a -r
or something ?
// TODO: make this work regardless of the test runner | ||
it.skip('call does not fail', () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cc: @uurien
packages/dd-trace/test/appsec/iast/analyzers/command-injection-analyzer.spec.js
Show resolved
Hide resolved
…-analyzer.spec.js Co-authored-by: simon-id <simon.id@datadoghq.com>
@uurien The CI is failing on windows for IAST tests only, please take a look. |
@simon-id I would prefer we not use extra args to do that. I'd like to be able just run a single test directly more easily by just running |
@@ -1,5 +1,7 @@ | |||
'use strict' | |||
|
|||
require('../setup') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should these first two files be require('../setup/tap')
?
Superseded by #2889 |
What does this PR do?
Update some tests to run in isolated workers using tap.
Motivation
We need a way to isolate tests so that we can write integration tests without complex logic to cleanup after the suite, which is also not always possible.