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
Firebase emulator does not stop when run with Golang exec command #2716
Comments
This issue does not have all the information required by the template. Looks like you forgot to fill out some sections. Please update the issue with more information. |
@d3c3balus normally we suggest inverting this. Instead of having your Go tests start the emulator (and deal with looking for the log messages, etc) use
The command above will:
Does that work for you? |
Thanks. I did not know that "the recommended" way to start tests is with I got inspired from this article where the command to start the emulator is I have the feeling that I'm missing something - can you please help me understand:
Thanks a lot! DC |
@d3c3balus great questions, this is definitely a confusing space. gcloud
firebase
So you can see that the |
@d3c3balus I hope that answered your question. Unfortunately none of us here can help you with I hope |
Indeed, I tried #1. I need to put a sleep (~1sec) before starting the testing, in order to allow the emulator to import the mock data. Anyway, this is not a big deal. #2. from time to time (not always, but often), independent of the tests being run (so for the same suite of tests), the
Anything about #2? Thank you! |
@d3c3balus hmmm not quite sure about that second issue .. it could be an issue inside the Firestore emulator or in the Go client library. If you find a way to reproduce it (or a hint of a way) could you let us know in a new issue so we can try to isolate the issue? |
[REQUIRED] Environment info
firebase-tools:
8.12.1
Platform:
Ubuntu
[REQUIRED] Test case
I'm trying to build tests for Firestore using the firebase emulator.
The emulator starts correctly, tests run, but the despite the SIGKILL (and I tried other signals) the emulator is not cleaned up after the tests finish.
[REQUIRED] Steps to reproduce
This is how my
main_test.go
looks like:The output of
go test . -v
is looking ok:But firebase emulator is not properly cleaned up (if I start the same command again, it fails complaining that port 4000 is already in use). The following processes are found lingering:
[REQUIRED] Expected behavior
I expect the SIGINT (or SIGKILL) sent by the program to kill the emulator and not leave any lingering processes.
[REQUIRED] Actual behavior
The following processes are found lingering, after
go test
finishes (even though SIGKILL was sent):The text was updated successfully, but these errors were encountered: