Comments (6)
I see, I never considered that critical that the tests ran fast,
Ideally yes. But then it will take a lot of time to run tests. Apart from the "branches" tests, tests are generally using the same surrealdb instance but in separate ns/db so there should never be any conflict.
I fixed an issue where the integration test was using a db named test
, instead of a random named one.
Could be just that one, it might well be, yeah.
I never experienced failed test or surrealdb process crash. Are you sure nothing else come in the way? Enough CPU? Enough RAM? I suppose you were not able to identify the cause.
I work on a beefy desktop PC. Since the two process used are put in the background, I could not catch what happened to them, I just got errors when the test tried to connect.
Could be an issue with my setup, or bugs in surrealdb related with the strict mode, which is what I was testing.
I'll close the issue for now, and reopen if I find out anything more concrete.
from surrealdb-migrations.
This means, before-integration-tests.sh
should not be required to be manually ran.
from surrealdb-migrations.
I also noticed that sometimes the surrealdb processes crash, or stop for some reason.
from surrealdb-migrations.
The 2 main goals with tests are:
- Tests should run in less than 10s, so parallelizing a maximum of tests is a priority. The ones that can't be run in parallel are the ones on branch feature. Might be a good idea to split in 2 test libraries. One in parallel and one in serial (one library per limited scope like branches). I can see that.
- Tests should run in CI. So having to launch a limited number of instances of surrealdb is good. And to mimic the workflow of the CI in your local computer, we need the same workflow.
While implementing #56 I noticed that tests will pass sometimes, and then they will not.
Never noticed that. I suppose you have no idea to determine the cause? I think it can happen to have ns/db conflict between 2 tests but that should be like one in a zillion.
Ideally each integration test should run in a fresh, uninitialized test database.
Ideally yes. But then it will take a lot of time to run tests. Apart from the "branches" tests, tests are generally using the same surrealdb instance but in separate ns/db so there should never be any conflict. We still need a right cleanup for "branches" test.
From my experience with other languages, they often have hooks to run stuff before/after a test suite or individual tests. I assume something similar can be done in Rust. This means,
before-integration-tests.sh
should not be required to be manually ran.
Kind of like setupTest
in jest or a beforeAll
/afterAll
in most languages. Yes, I can definitely see that. Not sure if it is possible at the moment. I mean, I did not found a solution for this.
I also noticed that sometimes the surrealdb processes crash, or stop for some reason.
I never experienced failed test or surrealdb process crash. Are you sure nothing else come in the way? Enough CPU? Enough RAM? I suppose you were not able to identify the cause.
from surrealdb-migrations.
On another note, I am also interested in a migration to nextest. But that should be in its own PR.
from surrealdb-migrations.
Thank you for your input. It emerges with good idea like splitting test library in 2. Will create an issue for this.
from surrealdb-migrations.
Related Issues (20)
- Migrate tests to cargo-nextest
- Split test library
- Running `cargo install surrealdb-migrations` currently fails HOT 2
- Running large migration file fails HOT 3
- Beta and nightly version support HOT 3
- Thankyou HOT 3
- Feature: Seeding HOT 3
- Feature: Publish to Homebrew
- Unable to install surrealdb-migrations error[E0658]: use of unstable library feature 'stdsimd' HOT 4
- Feature: use local config files HOT 2
- Bug: `READONLY` keyword HOT 1
- Provide a way to load migrations from a dir at runtime (not embedded) HOT 10
- Crate documentation not build for 1.2.0 HOT 2
- "`sql2` is currently unstable. You need to enable the `surrealdb_unstable` flag to use it." HOT 7
- find alternative to 'names' crate HOT 2
- Failed to apply database migrations: _initial.json file not found in the migrations/definitions directory HOT 7
- Running `cargo install surrealdb-migrations' fails HOT 3
- Make new release for SurrealDB 1.4.0 HOT 2
- Cannot create JWKS token HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from surrealdb-migrations.