Skip to content
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

Need a Shutdown Function for PostgresAdapter. #4352

Closed
wants to merge 8 commits into from
Closed

Need a Shutdown Function for PostgresAdapter. #4352

wants to merge 8 commits into from

Conversation

trylovetom
Copy link
Contributor

Add Postgres handleShutdown Function

@codecov
Copy link

codecov bot commented Nov 15, 2017

Codecov Report

Merging #4352 into master will decrease coverage by 10.68%.
The diff coverage is 0%.

Impacted file tree graph

@@             Coverage Diff             @@
##           master    #4352       +/-   ##
===========================================
- Coverage   92.64%   81.96%   -10.69%     
===========================================
  Files         119      119               
  Lines        8435     8438        +3     
===========================================
- Hits         7815     6916      -899     
- Misses        620     1522      +902
Impacted Files Coverage Δ
...dapters/Storage/Postgres/PostgresStorageAdapter.js 2.83% <0%> (-94.01%) ⬇️
src/Adapters/Storage/Postgres/PostgresClient.js 7.14% <0%> (-78.58%) ⬇️
src/Controllers/UserController.js 92.1% <0%> (-0.88%) ⬇️
src/Routers/UsersRouter.js 92.3% <0%> (-0.77%) ⬇️
src/RestWrite.js 93.32% <0%> (ø) ⬆️
src/Adapters/Storage/Mongo/MongoStorageAdapter.js 95.13% <0%> (+1.76%) ⬆️
src/ParseServer.js 96.92% <0%> (+2.3%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e1d04cd...9ef7d09. Read the comment docs.

@trylovetom
Copy link
Contributor Author

trylovetom commented Nov 15, 2017

What!!
I use the same code in ci testing. CI give two different result.
What's happened?

@steven-supersolid
Copy link
Contributor

For some reason another change in meetup.js is being considered - perhaps your branch is not up to date with master?

@trylovetom
Copy link
Contributor Author

@steven-supersolid Really? I have been rebase to the latest master.

@flovilmart
Copy link
Contributor

You should probably run the tests locally, before opening the PR, as it’s notifying all maintainers.

@flovilmart flovilmart closed this Nov 17, 2017
@trylovetom
Copy link
Contributor Author

@flovilmart How can I switch the db of testing to postgres, please. I really need this feature.

@flovilmart
Copy link
Contributor

@trylovetom
Copy link
Contributor Author

@flovilmart thx

@trylovetom
Copy link
Contributor Author

@flovilmart I need help, I wrote the testing code of handleShutdown(). But I didn't know how to test it correctly. Can you give me some tips?

@flovilmart
Copy link
Contributor

To test the code locally with postures, you need postgres 9.5.
then you'll need to setup a few things as PostGis extensions and the test DB:

$ psql -c 'create database parse_server_postgres_adapter_test_database;' -U postgres
$ psql -c 'CREATE EXTENSION postgis;' -U postgres -d parse_server_postgres_adapter_test_database
$ psql -c 'CREATE EXTENSION postgis_topology;' -U postgres -d parse_server_postgres_adapter_test_database

Then to run the tests:

$ PARSE_SERVER_TEST_DB=postgres npm test

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants