-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
parse-server still alive, after I shutdown the http express server. In Unit Test #4343
Comments
trylovetom
changed the title
Need Release DB Connection Pool
DB Connection Should Be Closed After Shutdown The Server
Nov 14, 2017
trylovetom
changed the title
DB Connection Should Be Closed After Shutdown The Server
Nov 14, 2017
parse-erver
still alive, after I shutdown the http express server.
trylovetom
changed the title
parse-server still alive, after I shutdown the http express server.
Nov 14, 2017
parse-erver
still alive, after I shutdown the http express server.
trylovetom
changed the title
parse-server still alive, after I shutdown the http express server.
parse-server still alive, after I shutdown the http express server. Unit Test
Nov 14, 2017
trylovetom
changed the title
parse-server still alive, after I shutdown the http express server. Unit Test
parse-server still alive, after I shutdown the http express server. In Unit Test
Nov 14, 2017
Use |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Issue Description
When I use
Jest
for unit test, I find some error from mypostgres
below.I have 200 unit test modules. Before each unit test , make the new
parse-server
. After each unit test, use http-shutdown for force shutdown.Either mongo or postgres. After each unit testing, it's connection still alive.
I think
StorageAdapter
not close the connection, after server shutdown.Lastest Updated
I have rewrote, but it isn't work.
@flovilmart
After I survey the shutdown code, I found handleShutdown only be implemented in monogo adapter.
It is't work. When I call this handleShutdown function,
this.databse
getundefined
. Because mongo adapter doesn't create a connection yet.Then, I wait a 3 second, and close it again. It works the mongo db connection!!
In postgres adapter I hasn't see it.
My Simply Test Case
Test Output
parse-server
still alive, after I shutdown the http express server.Any idea?
Steps to reproduce
one of my unit test code
Expected Results
The DB connection will be close, after each unit testing.
Actual Outcome
The DB connection still alive.
Environment Setup
Server
Database
Logs/Trace
mongo
postgres
The text was updated successfully, but these errors were encountered: