Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Embedded replicas encryption test #1124

Merged
merged 4 commits into from
Mar 4, 2024
Merged

Embedded replicas encryption test #1124

merged 4 commits into from
Mar 4, 2024

Conversation

haaawk
Copy link
Contributor

@haaawk haaawk commented Mar 4, 2024

When run with:

cargo test -F encryption --package libsql-server --test tests embedded_replica::embedded_replica_with_encryption

Fails with:

running 1 test
2024-03-04T13:28:35.019664Z ERROR tests::embedded_replica: sqlite error 21: API call with invalid database connection pointer
2024-03-04T13:28:35.019716Z ERROR tests::embedded_replica: sqlite error 21: misuse at line 180340 of [17129ba1ff]
2024-03-04T13:28:35.599894Z ERROR tests::embedded_replica: sqlite error 1555: abort at 15 in [INSERT INTO user (id) VALUES (1), (1);]: UNIQUE constraint failed: user.id
2024-03-04T13:28:35.604323Z ERROR tests::embedded_replica: sqlite error 21: API call with invalid database connection pointer
2024-03-04T13:28:35.604336Z ERROR tests::embedded_replica: sqlite error 21: misuse at line 180340 of [17129ba1ff]
2024-03-04T13:28:35.762028Z ERROR tests::embedded_replica: sqlite error 11: database corruption at line 96148 of [17129ba1ff]
2024-03-04T13:28:35.762057Z ERROR tests::embedded_replica: sqlite error 11: statement aborts at 4: [] database disk image is malformed
2024-03-04T13:28:35.762071Z ERROR tests::embedded_replica: sqlite error 11: database disk image is malformed in "PRAGMA journal_mode='WAL'"
2024-03-04T13:28:35.765014Z ERROR tests::embedded_replica: sqlite error 28: file unlinked while open: /private/var/folders/_y/nj5hcsh93l12tmsszxgx7ntr0000gn/T/.tmp9VBWrV/dbs/foo/data
2024-03-04T13:28:35.766108Z ERROR tests::embedded_replica: sqlite error 28: file unlinked while open: /private/var/folders/_y/nj5hcsh93l12tmsszxgx7ntr0000gn/T/.tmp9VBWrV/dbs/foo/data
2024-03-04T13:28:35.767147Z ERROR tests::embedded_replica: sqlite error 28: file unlinked while open: /private/var/folders/_y/nj5hcsh93l12tmsszxgx7ntr0000gn/T/.tmp9VBWrV/metastore/data
test embedded_replica::embedded_replica_with_encryption ... FAILED

failures:

---- embedded_replica::embedded_replica_with_encryption stdout ----
thread 'embedded_replica::embedded_replica_with_encryption' panicked at libsql-server/tests/embedded_replica/mod.rs:283:15:
called `Result::unwrap()` on an `Err` value: Replication(Injector(Sqlite(SqliteFailure(Error { code: DatabaseCorrupt, extended_code: 11 }, Some("database disk image is malformed")))))
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace


failures:
    embedded_replica::embedded_replica_with_encryption

test result: FAILED. 0 passed; 1 failed; 0 ignored; 0 measured; 52 filtered out; finished in 0.75s

error: test failed, to rerun pass `-p libsql-server --test tests`

Signed-off-by: Piotr Jastrzebski <[email protected]>
@haaawk haaawk force-pushed the failing_encryption branch from 3629f06 to 14ad672 Compare March 4, 2024 13:31
@haaawk
Copy link
Contributor Author

haaawk commented Mar 4, 2024

You can see in the CI of this PR:

        FAIL [   1.078s] libsql-server::tests embedded_replica::embedded_replica_with_encryption

--- STDOUT:              libsql-server::tests embedded_replica::embedded_replica_with_encryption ---

running 1 test
2024-03-04T13:41:36.059349Z ERROR tests::embedded_replica: sqlite error 21: API call with invalid database connection pointer
2024-03-04T13:41:36.059414Z ERROR tests::embedded_replica: sqlite error 21: misuse at line 180340 of [17129ba1ff]
2024-03-04T13:41:36.787345Z ERROR tests::embedded_replica: sqlite error 1555: abort at 15 in [INSERT INTO user (id) VALUES (1), (1);]: UNIQUE constraint failed: user.id
2024-03-04T13:41:36.795702Z ERROR tests::embedded_replica: sqlite error 21: API call with invalid database connection pointer
2024-03-04T13:41:36.795732Z ERROR tests::embedded_replica: sqlite error 21: misuse at line 180340 of [17129ba1ff]
2024-03-04T13:41:37.110236Z ERROR tests::embedded_replica: sqlite error 11: database corruption at line 75586 of [17129ba1ff]
2024-03-04T13:41:37.110325Z ERROR tests::embedded_replica: sqlite error 11: statement aborts at 4: [] database disk image is malformed
2024-03-04T13:41:37.110369Z ERROR tests::embedded_replica: sqlite error 11: database disk image is malformed in "PRAGMA journal_mode='WAL'"
2024-03-04T13:41:37.113899Z ERROR tests::embedded_replica: sqlite error 28: file unlinked while open: /tmp/.tmpQDqhpr/dbs/foo/data
2024-03-04T13:41:37.114704Z ERROR tests::embedded_replica: sqlite error 28: file unlinked while open: /tmp/.tmpQDqhpr/dbs/foo/data
2024-03-04T13:41:37.115352Z ERROR tests::embedded_replica: sqlite error 28: file unlinked while open: /tmp/.tmpQDqhpr/metastore/data
test embedded_replica::embedded_replica_with_encryption ... FAILED

failures:

failures:
    embedded_replica::embedded_replica_with_encryption

test result: FAILED. 0 passed; 1 failed; 0 ignored; 0 measured; 53 filtered out; finished in 1.06s


--- STDERR:              libsql-server::tests embedded_replica::embedded_replica_with_encryption ---
thread 'embedded_replica::embedded_replica_with_encryption' panicked at libsql-server/tests/embedded_replica/mod.rs:289:15:
called `Result::unwrap()` on an `Err` value: Replication(Injector(Sqlite(SqliteFailure(Error { code: DatabaseCorrupt, extended_code: 11 }, Some("database disk image is malformed")))))
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

   Canceling due to test failure: 3 tests still running

@LucioFranco LucioFranco added this pull request to the merge queue Mar 4, 2024
Merged via the queue into main with commit 1826582 Mar 4, 2024
16 checks passed
@LucioFranco LucioFranco deleted the failing_encryption branch March 4, 2024 16:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants