Skip to content

Commit

Permalink
Fix sqlalchemy flaky tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mdesmet committed Sep 13, 2022
1 parent 9d898a8 commit d358954
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions tests/integration/test_sqlalchemy_integration.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,9 @@ def test_insert(trino_connection):
schema="test")
metadata.create_all(engine)
ins = users.insert()
conn.execute(ins, {"id": 2, "name": "wendy", "fullname": "Wendy Williams"})
result = conn.execute(ins, {"id": 2, "name": "wendy", "fullname": "Wendy Williams"})
# TODO: Can we get rid of this?
result.fetchall()
query = sqla.select(users)
result = conn.execute(query)
rows = result.fetchall()
Expand All @@ -126,11 +128,13 @@ def test_insert_multiple_statements(trino_connection):
schema="test")
metadata.create_all(engine)
ins = users.insert()
conn.execute(ins, [
result = conn.execute(ins, [
{"id": 2, "name": "wendy", "fullname": "Wendy Williams"},
{"id": 3, "name": "john", "fullname": "John Doe"},
{"id": 4, "name": "mary", "fullname": "Mary Hopkins"},
])
# TODO: Can we get rid of this?
result.fetchall()
query = sqla.select(users)
result = conn.execute(query)
rows = result.fetchall()
Expand Down

0 comments on commit d358954

Please sign in to comment.