essential-contributions / essential-server

Centralized implementation of the Essential declarative protocol
Apache License 2.0
0 stars 0 forks source link

feat: test both dbs, fix a few bugs #146

Closed freesig closed 4 months ago

freesig commented 5 months ago

This combines the tests from both dbs so we can easily write the same tests for both dbs. It also fixes a few bugs that were found in the process.

I will do a follow up to get rqlite working in CI and add more test coverage.

freesig commented 5 months ago

Actually this won't pass current CI because we test for all features.

freesig commented 5 months ago

Any suggestions on how to get this passing ci?

mitchmindtree commented 5 months ago

It looks like we just need rqlite to be available at the same time? I'll do a quick PR against your branch to try and modify CI to use nix to provide the development environment

mitchmindtree commented 5 months ago

I've opened https://github.com/essential-contributions/essential-server/pull/147 - it looks like it at least starts the tests now, but for some reason they're running a long time :thinking:

https://github.com/essential-contributions/essential-server/actions/runs/9310327104/job/25627526110?pr=147#step:7:635

Running the same command from a fresh shell locally works nicely though. I'll try re-running it to see if it hangs in the same spot.

mitchmindtree commented 5 months ago

Hmmm same thing's happening :thinking: any idea what might be hanging in those tests? Maybe some kind of I/O that CI doesn't allow for some reason but we're retrying on error, or its not giving us a proper error or something?

freesig commented 5 months ago

hmm this relies on rqlite getting a port and becoming the leader. Probably rqlite is failing to launch? Do tempdirs work in ci? code

freesig commented 5 months ago

I'd probably try printing out the line on your branch and see what rqlite is doing?

freesig commented 5 months ago

Actually your branch is missing test-dbs? Is in not branched off my branch? https://github.com/essential-contributions/essential-server/tree/mitchmindtree/freesig-test-dbs/crates