From fbbf7a66194163172db5a62ba236658a8519bb0e Mon Sep 17 00:00:00 2001
From: Erik Khamitov <e.khamitov@picodata.io>
Date: Tue, 4 Feb 2025 09:24:40 +0300
Subject: [PATCH] fix: flaky test_localtimestamp

When specifying the precision for localtimestamp, the digits to the right are zeroed out. However, if there were already zeros in those positions in the original value, the test may fail even when precisions are different. This can lead to flaky tests so test is removed.
---
 test/pgproto/datetime_test.py | 9 ---------
 1 file changed, 9 deletions(-)

diff --git a/test/pgproto/datetime_test.py b/test/pgproto/datetime_test.py
index d9f97e34e0..0cbcf18e04 100644
--- a/test/pgproto/datetime_test.py
+++ b/test/pgproto/datetime_test.py
@@ -260,15 +260,6 @@ def test_localtimestamp(postgres: Postgres):
     result = cur.fetchall()
     assert result == [(True,)]
 
-    # Test that different precisions have different results
-    cur.execute(
-        """
-        SELECT localtimestamp(2) = localtimestamp(4);
-    """
-    )
-    result = cur.fetchall()
-    assert result == [(False,)]
-
     # Verify that precision 0 has no fractional sec
     cur.execute(
         """
-- 
GitLab