Skip to content

Commit 23fbc7b

Browse files
committed
Fixed CI
1 parent 7a8187b commit 23fbc7b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/pgslice_test.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,10 +119,10 @@ def assert_period(period, column: "createdAt", trigger_based: false, tablespace:
119119
$conn.exec('INSERT INTO "Posts" ("' + column + '") VALUES (\'' + now.iso8601 + '\') RETURNING "Id"').first
120120

121121
run_command "analyze Posts"
122-
last_analyzed = $conn.exec("SELECT relname, EXTRACT(EPOCH FROM NOW() - last_analyze) AS last_analyzed FROM pg_stat_all_tables WHERE relname LIKE 'Posts_%'").to_a
123-
assert_equal 4, last_analyzed.size
124122
# https://github.com/postgres/postgres/commit/375aed36ad83f0e021e9bdd3a0034c0c992c66dc
125123
if server_version_num >= 150000
124+
last_analyzed = $conn.exec("SELECT relname, EXTRACT(EPOCH FROM NOW() - last_analyze) AS last_analyzed FROM pg_stat_all_tables WHERE relname LIKE 'Posts_%'").to_a
125+
assert_equal 4, last_analyzed.size
126126
assert last_analyzed.all? { |v| v["last_analyzed"]&.to_f < 0.01 }
127127
end
128128

0 commit comments

Comments
 (0)