Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Larkooo committed Sep 27, 2024
1 parent 994abc5 commit 65612fa
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions crates/torii/core/src/sql_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ where
#[katana_runner::test(accounts = 10, db_dir = copy_spawn_and_move_db().as_str())]
async fn test_load_from_remote(sequencer: &RunnerCtx) {
let options = SqliteConnectOptions::from_str("").unwrap().create_if_missing(true);
let pool = SqlitePoolOptions::new().max_connections(5).connect_with(options).await.unwrap();
let pool = SqlitePoolOptions::new().min_connections(1).idle_timeout(None).max_lifetime(None).connect_with(options).await.unwrap();
sqlx::migrate!("../migrations").run(&pool).await.unwrap();

let setup = CompilerTestSetup::from_examples("../../dojo-core", "../../../examples/");
Expand Down Expand Up @@ -219,7 +219,7 @@ async fn test_load_from_remote(sequencer: &RunnerCtx) {
#[katana_runner::test(accounts = 10, db_dir = copy_spawn_and_move_db().as_str())]
async fn test_load_from_remote_del(sequencer: &RunnerCtx) {
let options = SqliteConnectOptions::from_str("").unwrap().create_if_missing(true);
let pool = SqlitePoolOptions::new().max_connections(5).connect_with(options).await.unwrap();
let pool = SqlitePoolOptions::new().min_connections(1).idle_timeout(None).max_lifetime(None).connect_with(options).await.unwrap();
sqlx::migrate!("../migrations").run(&pool).await.unwrap();

let setup = CompilerTestSetup::from_examples("../../dojo-core", "../../../examples/");
Expand Down Expand Up @@ -321,7 +321,7 @@ async fn test_load_from_remote_del(sequencer: &RunnerCtx) {
#[katana_runner::test(accounts = 10, db_dir = copy_spawn_and_move_db().as_str())]
async fn test_update_with_set_record(sequencer: &RunnerCtx) {
let options = SqliteConnectOptions::from_str("").unwrap().create_if_missing(true);
let pool = SqlitePoolOptions::new().max_connections(5).connect_with(options).await.unwrap();
let pool = SqlitePoolOptions::new().min_connections(1).idle_timeout(None).max_lifetime(None).connect_with(options).await.unwrap();
sqlx::migrate!("../migrations").run(&pool).await.unwrap();

let setup = CompilerTestSetup::from_examples("../../dojo-core", "../../../examples/");
Expand Down
2 changes: 1 addition & 1 deletion crates/torii/graphql/src/tests/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ pub async fn model_fixtures(db: &mut Sql) {
pub async fn spinup_types_test() -> Result<SqlitePool> {
// change sqlite::memory: to sqlite:~/.test.db to dump database to disk
let options = SqliteConnectOptions::from_str("")?.create_if_missing(true).with_regexp();
let pool = SqlitePoolOptions::new().max_connections(5).connect_with(options).await.unwrap();
let pool = SqlitePoolOptions::new().min_connections(1).idle_timeout(None).max_lifetime(None).connect_with(options).await.unwrap();
sqlx::migrate!("../migrations").run(&pool).await.unwrap();

let setup = CompilerTestSetup::from_paths("../../dojo-core", &["../types-test"]);
Expand Down
2 changes: 1 addition & 1 deletion crates/torii/grpc/src/server/tests/entities_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ use crate::types::schema::Entity;
#[katana_runner::test(accounts = 10, db_dir = copy_spawn_and_move_db().as_str())]
async fn test_entities_queries(sequencer: &RunnerCtx) {
let options = SqliteConnectOptions::from_str("").unwrap().create_if_missing(true).with_regexp();
let pool = SqlitePoolOptions::new().max_connections(5).connect_with(options).await.unwrap();
let pool = SqlitePoolOptions::new().min_connections(1).idle_timeout(None).max_lifetime(None).connect_with(options).await.unwrap();
sqlx::migrate!("../migrations").run(&pool).await.unwrap();

let setup = CompilerTestSetup::from_examples("../../dojo-core", "../../../examples/");
Expand Down

0 comments on commit 65612fa

Please sign in to comment.