Commit bf737c4 1 parent 51f3856 commit bf737c4 Copy full SHA for bf737c4
File tree 1 file changed +3
-4
lines changed
1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change 6
6
from random import randint
7
7
8
8
import pytest
9
- from batch_others .test_backpressure import pg_cur
10
9
from fixtures import log_helper
11
10
from fixtures .benchmark_fixture import MetricReport
12
11
from fixtures .compare_fixtures import PgCompare
17
16
18
17
19
18
def start_write_workload (pg : Postgres , scale : int = 10 ):
20
- with pg_cur ( pg ) as cur :
19
+ with pg . connect (). cursor ( ) as cur :
21
20
cur .execute (f"create table big as select generate_series(1,{ scale * 100_000 } )" )
22
21
23
22
@@ -26,10 +25,10 @@ def test_measure_read_latency_heavy_write_workload(neon_with_baseline: PgCompare
26
25
env = neon_with_baseline
27
26
pg = env .pg
28
27
29
- with pg_cur ( pg ) as cur :
28
+ with pg . connect (). cursor ( ) as cur :
30
29
cur .execute (f"create table small as select generate_series(1,{ scale * 100_000 } )" )
31
30
32
31
write_thread = threading .Thread (target = start_write_workload , args = (pg , scale * 100 ))
33
32
write_thread .start ()
34
33
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" )
You can’t perform that action at this time.
0 commit comments