Skip to content

Commit bf737c4

Browse files
committed
Fix test_latency build
1 parent 51f3856 commit bf737c4

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

test_runner/performance/test_latency.py

+3-4
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
from random import randint
77

88
import pytest
9-
from batch_others.test_backpressure import pg_cur
109
from fixtures import log_helper
1110
from fixtures.benchmark_fixture import MetricReport
1211
from fixtures.compare_fixtures import PgCompare
@@ -17,7 +16,7 @@
1716

1817

1918
def start_write_workload(pg: Postgres, scale: int = 10):
20-
with pg_cur(pg) as cur:
19+
with pg.connect().cursor() as cur:
2120
cur.execute(f"create table big as select generate_series(1,{scale*100_000})")
2221

2322

@@ -26,10 +25,10 @@ def test_measure_read_latency_heavy_write_workload(neon_with_baseline: PgCompare
2625
env = neon_with_baseline
2726
pg = env.pg
2827

29-
with pg_cur(pg) as cur:
28+
with pg.connect().cursor() as cur:
3029
cur.execute(f"create table small as select generate_series(1,{scale*100_000})")
3130

3231
write_thread = threading.Thread(target=start_write_workload, args=(pg, scale * 100))
3332
write_thread.start()
3433

35-
record_read_latency(env, write_thread, "SELECT count(*) from small")
34+
record_read_latency(env, lambda: write_thread.is_alive(), "SELECT count(*) from small")

0 commit comments

Comments
 (0)