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

ergo: Create MySQL subprocess instead of using external DB #170

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

progval
Copy link
Owner

@progval progval commented Jun 14, 2022

This starts each test with a clean database, so we can remove chan/nick
randomization from stateful tests (chathistory and roleplay).

It will also allow testing Ergo with a MySQL backend for the KV store
instead of buntdb.

Additionally, this makes it much easier to run these tests, than having
to manually configure such a database.

@progval progval requested a review from slingamn June 14, 2022 08:52
@github-actions
Copy link

Test results

This statement was a no-op, given the value defined in BASE_CONFIG
This starts each test with a clean database, so we can remove chan/nick
randomization from stateful tests (chathistory and roleplay).

It will also allow testing Ergo with a MySQL backend for the KV store
instead of buntdb.

Additionally, this makes it much easier to run these tests, than having
to manually configure such a database.
@github-actions
Copy link

Test results

@github-actions
Copy link

Test results

@github-actions
Copy link

Test results

@slingamn
Copy link
Collaborator

This works on my system now, but is extremely slow: total Ergo suite execution time goes from 30s to 4m30s. It seems to me like this negates any advantage in convenience from not having to set up one's own database.

Maybe we could add an ergo subcommand that truncates the MySQL-backed KV store? It could take a randomly generated confirmation code to guard against accident.

@progval
Copy link
Owner Author

progval commented Jun 15, 2022

Mount a tmpfs on /tmp or try eatmydata

@progval
Copy link
Owner Author

progval commented Jun 15, 2022

Maybe we could add an ergo subcommand that truncates the MySQL-backed KV store?

This wouldn't support running tests in parallel. It's not a big deal with Ergo at the moment, but still speeds up the test suite on my machine

@progval
Copy link
Owner Author

progval commented Jun 16, 2022

Maybe we could add an ergo subcommand that truncates the MySQL-backed KV store?

This wouldn't support running tests in parallel. It's not a big deal with Ergo at the moment, but still speeds up the test suite on my machine

actually, this would work, I would just need to setup per-process databases

@progval
Copy link
Owner Author

progval commented Sep 11, 2022

In #176 I solved this by configuring the controlled process to use a different table prefix on every run.

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.

None yet

2 participants