Skip to content

Commit e08eda4

Browse files
committed
tests: Fix some small issues
1 parent 4a98bd5 commit e08eda4

3 files changed

Lines changed: 9 additions & 3 deletions

File tree

test/error_handling_test.exs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,12 @@ defmodule EctoLibSql.ErrorHandlingTest do
202202

203203
2 ->
204204
# Invalid transaction
205-
EctoLibSql.Native.execute_with_transaction("invalid-trx-#{i}", "SELECT 1", [])
205+
EctoLibSql.Native.execute_with_transaction(
206+
"invalid-trx-#{i}",
207+
real_conn_id,
208+
"SELECT 1",
209+
[]
210+
)
206211
end
207212
end)
208213
end)

test/statement_features_test.exs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,7 @@ defmodule EctoLibSql.StatementFeaturesTest do
170170
EctoLibSql.Native.close_stmt(stmt_id)
171171
end
172172

173+
@tag :flaky
173174
test "statement caching improves performance vs re-prepare", %{state: state} do
174175
sql = "INSERT INTO users VALUES (?, ?, ?)"
175176

@@ -209,7 +210,7 @@ defmodule EctoLibSql.StatementFeaturesTest do
209210
ratio = time_with_cache / time_with_prepare
210211

211212
assert ratio <= 1.5,
212-
"Cached statements should not be 50% slower than re-prepare (got #{ratio}x)"
213+
"Cached statements should be faster than re-prepare (got #{ratio}x)"
213214
end
214215
end
215216

test/turso_remote_test.exs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ defmodule TursoRemoteTest do
2222
@moduletag skip: is_nil(@turso_uri) || is_nil(@turso_token)
2323

2424
setup_all do
25-
if !(is_nil(@turso_uri) || is_nil(@turso_token)) do
25+
if not (is_nil(@turso_uri) or is_nil(@turso_token)) do
2626
IO.puts("\n[TURSO TESTS] Running remote Turso database tests")
2727
IO.puts("[TURSO TESTS] Using database: #{@turso_uri}")
2828
end

0 commit comments

Comments
 (0)