Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
max-hoffman committed Sep 12, 2024
1 parent 205249f commit 840fe90
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions integration-tests/bats/stats.bats
Original file line number Diff line number Diff line change
Expand Up @@ -136,17 +136,18 @@ teardown() {
dolt sql -q "insert into xy values (0,0), (1,1), (2,2), (3,3), (4,4)"
dolt sql -q "insert into ab values (0,0), (1,1), (2,2), (3,3), (4,4)"
dolt sql -q "ANALYZE table xy, ab"
dolt sql <<EOF
run dolt sql -r csv <<EOF
select count(*) from dolt_statistics;
set @@GLOBAL.dolt_stats_auto_refresh_interval = 2;
call dolt_stats_restart();
select count(*) from dolt_statistics;
select sleep(3);
select count(*) from dolt_statistics;
EOF

run stat .dolt/repo2
[ "$status" -eq 1 ]
[ "${lines[1]}" = "4" ]
[ "${lines[5]}" = "4" ]
[ "${lines[9]}" = "4" ]
[ "$status" -eq 0 ]
}

@test "stats: stats roundtrip restart" {
Expand Down Expand Up @@ -402,6 +403,7 @@ SQL
dolt sql <<SQL
use repo2;
insert into xy values (0,0);
analyze table xy;
SQL

sleep 1
Expand Down

0 comments on commit 840fe90

Please sign in to comment.