Comments (6)
I don't have any problems on my side. I did npm install
, then node ace test
after filling my .env file.
Is there anything else to do?
from runner.
Hm, I wonder if this is different on windows. I'm on a mac and the github action runs on ubuntu.
I have a windows machine I can try and report back on.
from runner.
I can't recreate on windows.
from runner.
Okay thanks for testing ! I'll dust off my old mac and give it a try asap
from runner.
So I tried using wtfnode to see what is keeping it alive, looks like something is using a stream/pipe but it wasn't too informative.
functional / Service Provider Profile (tests/functional/hello_world.spec.ts)
✔ display welcome page (224ms)
run
✔ upload doesn't hang (217ms)
✖ upload hangs (208ms)
✖ upload doesn't hang for full url (213ms)
^C[WTF Node?] open handles:
- File descriptors: (note: stdio always exists)
- fd 1 (tty) (stdio)
- fd 2 (tty) (stdio)
- Child processes
- PID 10096
- Entry point: node:internal/child_process:253
- Others:
- Pipe
I've tried the latest minors of node 16 and 18.
If I comment out the this.request.attach(...)
line for the file
method the tests exit, so I thought the issue might be in superagent but it emits the error that the file doesn't exist as expected.
The suite:end
event never seems to be emitted though.
If I use a full domain name eg
test("upload doesn't hang for full url", async ({ client }) => {
await client
.post(`https://example.com/`)
.file("avatar", join(__dirname, "/does/not/exist/", "file.jpg"));
});
It will exit as expected. If I use a relative url (whether or not it exists in routes.ts) it hangs.
I have managed to narrow down the issue to this function
async runSetupCleanupFunctions() {
console.log('runSetupCleanupFunctions this does log');
try {
await this.setupRunner.cleanup(this.hasError, this.suite);
console.log('this never logs');
}
catch (error) {
console.log('and neither does this');
this.hasError = true;
this.errors.push({ phase: 'setup:cleanup', error });
}
}
If await this.setupRunner.cleanup(this.hasError, this.suite);
is changed to this.setupRunner.cleanup(this.hasError, this.suite);
it works. I don't know why.
Removing the cleanup code has no effect.
group.each.setup(async () => {
await sleep(100);
// return async () => await sleep(100);
});
Ok so I've landed on @adonisjs/core/build/src/TestUtils/HttpServer/index.js
close() {
return new Promise((resolve) => this.server.instance.close(() => resolve()));
}
This never resolves.
from runner.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
from runner.
Related Issues (20)
- [Bug]: "Only file and data URLs are supported by the default ESM loader" when running in Windows environment. HOT 2
- Allow failing slowly in a test case HOT 1
- Adonis tests are failing when we setup application on different PC or location or after re-installing the dependencies. HOT 10
- Assertion method `expected` and `actual` parameter orders should be predictable HOT 3
- Should setup group-hook inject stuff into test context HOT 1
- Test results in failed when testing explicitly thrown function
- Test runner breaks when `group` handler is `async` HOT 4
- Test runner breaks when error is thrown
- Need HTML Test report HOT 3
- Add help commands to "processCliArgs" HOT 1
- Add `--reporters` argument HOT 15
- Open APIs to get the current test/group and file name from a plugin HOT 9
- Property 'expect' does not exist on type TextContext HOT 2
- Bug with assertAgainstApiSpec on Adonisjs HOT 8
- Config `importer` function returns wrong path when using ESM loader HOT 4
- Unable to run migrations in github workflow when automating test runner HOT 1
- Typescript non-relative path class imports HOT 4
- group.each.setup don't seem to be called from configureSuite
- Migrations should be run silently. HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from runner.