mirror of
https://github.com/tursodatabase/limbo.git
synced 2025-08-04 18:18:03 +00:00
fix: stress test will ignore unique constraint violation
This commit is contained in:
parent
35948c6dbb
commit
4b66bcb2a7
2 changed files with 9 additions and 6 deletions
|
@ -438,6 +438,9 @@ async fn main() -> Result<(), Box<dyn std::error::Error + Send + Sync>> {
|
|||
limbo::Error::SqlExecutionFailure(e) => {
|
||||
if e.contains("Corrupt database") {
|
||||
panic!("Error executing query: {}", e);
|
||||
} else if e.contains("UNIQUE constraint failed") {
|
||||
println!("Skipping UNIQUE constraint violation: {}", e);
|
||||
continue;
|
||||
} else {
|
||||
println!("Error executing query: {}", e);
|
||||
}
|
||||
|
|
|
@ -130,12 +130,12 @@ do_execsql_test_in_memory_any_error strict-update-not-null-constraint {
|
|||
}
|
||||
|
||||
# Uncomment following test case when unique constraint is added
|
||||
#do_execsql_test_any_error strict-update-pk-constraint {
|
||||
# CREATE TABLE test8(id INTEGER PRIMARY KEY, name TEXT) STRICT;
|
||||
# INSERT INTO test8 VALUES(1, 'name1');
|
||||
# INSERT INTO test8 VALUES(2, 'name2');
|
||||
# UPDATE test8 SET id = 2 WHERE id = 1;
|
||||
#}
|
||||
do_execsql_test_any_error strict-update-pk-constraint {
|
||||
CREATE TABLE test8(id INTEGER PRIMARY KEY, name TEXT) STRICT;
|
||||
INSERT INTO test8 VALUES(1, 'name1');
|
||||
INSERT INTO test8 VALUES(2, 'name2');
|
||||
UPDATE test8 SET id = 2 WHERE id = 1;
|
||||
}
|
||||
|
||||
do_execsql_test_on_specific_db {:memory:} strict-update-multiple-columns {
|
||||
CREATE TABLE test9(id INTEGER, name TEXT, price REAL, quantity INT) STRICT;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue