-
Notifications
You must be signed in to change notification settings - Fork 73
Documentation about making tests #23
Comments
Frank, |
Just as the title says. To make writing tests a little bit easier. |
Maybe the parallel test is not good enough. When I run the test, nearly all the parallel tests failed. Any idea to improve parallel test? |
Can you tell me more about your setup? It works for me with server located over LAN. It also runs on Travis CI without any issues. |
System and pip versions: Test code: Result: Using psycopg2 FAIL: test_parallel_queries_after_reconnect_all (tests.MomokoParallelTest) Testing that pool still queries database in parallel after ALL connections were killedTraceback (most recent call last): FAIL: test_parallel_queries_after_reconnect_some (tests.MomokoParallelTest) Testing that pool still queries database in parallel after SOME connections were killedTraceback (most recent call last): FAIL: test_parallel_queries_after_reconnect_all (tests.MomokoStretchTest) Testing that pool still queries database in parallel after ALL connections were killedTraceback (most recent call last): FAIL: test_parallel_queries_after_reconnect_some (tests.MomokoStretchTest) Testing that pool still queries database in parallel after SOME connections were killedTraceback (most recent call last): FAIL: test_stretch_after_disonnect (tests.MomokoStretchTest) Testing that stretch works after disconnectTraceback (most recent call last): Ran 38 tests in 28.159s FAILED (failures=5) |
Where does you postgres server run? Localhost? If not on localhost, can you ping it and post the output? |
It was on the localhost.
|
I think somehow in your case connections take long to reconnect. Regular parallel test in your case goes fine, but reconnect test does not. I can bump assert time to 1.3 factor, but I wonder if its a good idea. May be you should measure how long on average it takes to initialize one synchronous connection (regular |
Documentation about making tests. With some code example ofcourse.
The text was updated successfully, but these errors were encountered: