Skip to content

Commit 901aa59

Browse files
committed
fix sqlite test
1 parent fa052b3 commit 901aa59

1 file changed

Lines changed: 15 additions & 2 deletions

File tree

tests/integration/sqlite.rs

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,10 @@ fn db_file_path(id: &str) -> std::path::PathBuf {
1919
}
2020

2121
fn db_url(id: &str) -> String {
22-
format!("sqlite://{}?mode=rwc", db_file_path(id).display())
22+
format!(
23+
"sqlite://{}?mode=rwc&busy_timeout=5000",
24+
db_file_path(id).display()
25+
)
2326
}
2427

2528
async fn setup_db(id: &str) {
@@ -70,8 +73,13 @@ routes:
7073
concurrency: 4
7174
batch_size: 128
7275
input:
73-
memory: { topic: "sqlx-sqlite-in" }
76+
memory: { topic: "sqlx-sqlite-in", enable_nack: true }
7477
output:
78+
middlewares:
79+
- retry:
80+
max_attempts: 10
81+
initial_interval_ms: 100
82+
max_interval_ms: 1000
7583
sqlx:
7684
url: "{db_url}"
7785
table: "messages"
@@ -80,6 +88,11 @@ routes:
8088
concurrency: 4
8189
batch_size: 128
8290
input:
91+
middlewares:
92+
- retry:
93+
max_attempts: 10
94+
initial_interval_ms: 100
95+
max_interval_ms: 1000
8396
sqlx:
8497
url: "{db_url}"
8598
table: "messages"

0 commit comments

Comments
 (0)