This repository has been archived by the owner on Feb 20, 2023. It is now read-only.
JUnit: Timestamps are compared as strings rather than parsed #1293
Labels
bug
Something isn't working (correctness). Mark issues with this.
infrastructure
Infrastructure related issues or changes (CMake, dependencies, CI)
Bug Report
Summary
Our JUnit test suite compares the timestamps returned by Postgres and Noisepage as string literals rather than attempting to parse them before checking equivalence. This leads to trailing zeros in the decimal seconds portion becoming significant.
Environment
OS: Ubuntu 18.04 (LTS)
Compiler: GCC 7.0+ and Clang 8.0+.
Steps to Reproduce
Create a JUnit tracefile with a timestamp column and insert a timestamp with 5 decimal places in the seconds. Postgres will omit the trailing zero for microsecond precision, but Noisepage includes it.
Here is the base SQL code:
Which becomes the following trace file:
Expected Behavior
The above tracefile should pass regardless of extra trailing zeros on the timestamp.
Actual Behavior
The test fails with the following error message:
The text was updated successfully, but these errors were encountered: