Skip to content

Commit a665d10

Browse files
committed
Fixed CI
1 parent 693abfa commit a665d10

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

test/pgslice_test.rb

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -149,9 +149,8 @@ def assert_period(period, column: "createdAt", trigger_based: false, tablespace:
149149
run_command "analyze Posts"
150150
# https://github.com/postgres/postgres/commit/375aed36ad83f0e021e9bdd3a0034c0c992c66dc
151151
if server_version_num >= 150000
152-
last_analyzed = $conn.exec("SELECT relname, EXTRACT(EPOCH FROM NOW() - last_analyze) AS last_analyzed FROM pg_stat_user_tables WHERE relname LIKE 'Posts_%'").to_a
153-
assert_equal 4, last_analyzed.size
154-
assert last_analyzed.all? { |v| v["last_analyzed"]&.to_f < 0.01 }
152+
last_analyzed = $conn.exec("SELECT relname, last_analyze FROM pg_stat_user_tables WHERE relname LIKE 'Posts_%'").to_a
153+
assert_equal 4, last_analyzed.count { |v| v["last_analyze"] }
155154
end
156155

157156
# TODO check sequence ownership

0 commit comments

Comments
 (0)