-
Notifications
You must be signed in to change notification settings - Fork 53
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
dartfn-generated project fails tests locally #295
Comments
CC: @kevmoo. |
Do you already have a server running on your machine @ 8080? Guessing that's it! |
I don't believe that's the cause of the initial failure. If I run the tests a second time, though, I do get that error:
I believe the |
That's 🍌 🍌 . Hrm... |
Glad you're trying this out! |
So? I've just created a project with the |
I cannot see in this section of the quickstart that it's required to manually start the server before running |
My output of running backend ✔ 33m ⍉
▶ dart test
00:01 +0 -1: test/function_test.dart: defaults [E]
Expected: <0>
Actual: <-15>
Process `dart bin/server.dart` had an unexpected exit code.
package:test_api expect
package:test_process/test_process.dart 228:5 TestProcess.shouldExit
===== asynchronous gap ===========================
test/function_test.dart 28:5 main.<fn>
Process `dart bin/server.dart` exited with exitCode -15. Output:
Listening on :8080
2021-12-23T11:49:26.447544 0:00:00.005582 GET [200] /
00:01 +0 -1: Some tests failed.
Consider enabling the flag chain-stack-traces to receive more detailed exceptions.
For example, 'dart test --chain-stack-traces'.
backend ✔ 33m ⍉
▶ lsof -i tcp:8080
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
dart 85133 jakub 12u IPv4 0x6f20cda13ac1c289 0t0 TCP *:http-alt (LISTEN)
So it seems that the proc.signal(ProcessSignal.sigterm); ...doesn't work as expected and doesn't stop the process. What bothers me is the -15 exit code. I'm not a great expert on *nix systems, but where could this exit code come from, if I've just checked, and the -15 exit code correspond to SIGTERM, which has signal id = 15. From
It seems that it's expected that the exit code will be -15 if we send the sigterm to the process. So the only mistery is why the server process, from one perspective, seems to exit with the (proper) -15 exit code, but on the other hand seems to be still alive and blocking the port. |
Would be awesome if we got this solved, what I could do to help was trying every single ProccessSignal const and did it. All of the maintain that process active and I had to do a
I think this might be related to package EDIT: |
I just tried creating a project with dartfn, and I can't get the generated code to pass its included tests:
Any idea what might be going wrong for me? Have I missed a step somewhere?
My Dart version is:
The text was updated successfully, but these errors were encountered: