Skip to content
This repository has been archived by the owner on Apr 17, 2019. It is now read-only.

Proper database drop for storage #1406

Closed
wants to merge 3 commits into from
Closed

Proper database drop for storage #1406

wants to merge 3 commits into from

Conversation

l4l
Copy link
Contributor

@l4l l4l commented Jun 2, 2018

Description of the Change

  • Add Storage::init
  • Add StorageImpl::cleanupTables
  • Add logic for database drop in StorageImpl::dropStorage
  • Refactor ametsuchi test a bit

Benefits

Now postgres is not polluted by the numerous databases created after tests

Possible Drawbacks

None?

Usage Examples or Tests

Try ametsuchi_test or any integration test, after the test is finished there should be no new databases.

- Add Storage::init
- Add StorageImpl::cleanupTables
- Add logic for database drop in StorageImpl::dropStorage
- Refactor ametsuchi test a bit

Signed-off-by: Kitsu <[email protected]>
@l4l l4l added needs-review pr awaits review from maintainers pri:critical tests pr aimed at the code coverage increase or test refactorings ametsuchi labels Jun 2, 2018
@l4l l4l requested review from kamilsa, lebdron and igor-egorov and removed request for kamilsa June 2, 2018 01:05
Copy link
Contributor

@igor-egorov igor-egorov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please check Jenkins log for x86_64_linux platform too (despite it marked with a green check, there are 15 failed tests).

@l4l l4l added candidate-for-closing and removed needs-review pr awaits review from maintainers labels Jun 12, 2018
- Do not catch exception for dropStorage
- Add reset method for Storage iface, use cleanupTables in StorageImpl
for that
- Use proper methods, where its applicable

Signed-off-by: Kitsu <[email protected]>
@neewy
Copy link
Contributor

neewy commented Jun 22, 2018

@l4l why is this PR pending?

@lebdron
Copy link
Contributor

lebdron commented Jun 22, 2018

@neewy it does not work with current structures of connections. Introducing SOCI will probably help to get this done.

@l4l
Copy link
Contributor Author

l4l commented Jun 23, 2018

I close pr, but please do not delete the branch. It might be reused upon required fixes are done

@l4l l4l closed this Jun 23, 2018
@l4l l4l deleted the fix/db_clean branch July 22, 2018 17:57
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
ametsuchi candidate-for-closing pri:critical tests pr aimed at the code coverage increase or test refactorings
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants