#22204·presto

TestHistoryBasedStatsTracking.testHistoryBasedStatsCalculator is flaky

Author: elharoCreated Mar 14, 2024Updated Sep 10, 2026
Labelsflaky-test

This test and its superclass shares a lot of state between test methods. Possibly it could be deflaked by moving some or all of the initialization from BeforeClass to BeforeMethod.

2024-03-14T11:13:03.2037597Z [ERROR] Tests run: 61, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 203.158 s <<< FAILURE! - in TestSuite 2024-03-14T11:13:03.2039919Z [ERROR] com.facebook.presto.execution.TestHistoryBasedStatsTracking.testHistoryBasedStatsCalculator Time elapsed: 0.103 s <<< FAILURE! 2024-03-14T11:13:03.2041698Z java.lang.AssertionError: 2024-03-14T11:13:03.2042236Z Plan does not match, expected [ 2024-03-14T11:13:03.2042619Z 2024-03-14T11:13:03.2042831Z - anyTree 2024-03-14T11:13:03.2043243Z - node(FilterNode) 2024-03-14T11:13:03.2043717Z expectedOutputRowCount(2.0) 2024-03-14T11:13:03.2044279Z expectedOutputSize(199.0) 2024-03-14T11:13:03.2044826Z - node 2024-03-14T11:13:03.2045059Z 2024-03-14T11:13:03.2045211Z ] but found [ 2024-03-14T11:13:03.2045439Z 2024-03-14T11:13:03.2047776Z - Output[PlanNodeId 6][nationkey, name, regionkey, comment] => [nationkey:bigint, name:varchar(25), regionkey:bigint, comment:varchar(152)] 2024-03-14T11:13:03.2053014Z - ScanFilter[PlanNodeId 0,108][table = TableHandle {connectorId='tpch', connectorHandle='nation:sf0.01', layout='Optional[nation:sf0.01]'}, filterPredicate = (substr(name, BIGINT'1', BIGINT'1')) = (VARCHAR'A')] => [nationkey:bigint, name:varchar(25), regionkey:bigint, comment:varchar(152)] 2024-03-14T11:13:03.2055339Z regionkey := tpch:regionkey (1:15) 2024-03-14T11:13:03.2055952Z name := tpch:name (1:15) 2024-03-14T11:13:03.2056545Z comment := tpch:comment (1:15) 2024-03-14T11:13:03.2057173Z nationkey := tpch:nationkey (1:15) 2024-03-14T11:13:03.2057603Z 2024-03-14T11:13:03.2057742Z ] 2024-03-14T11:13:03.2058575Z at com.facebook.presto.sql.planner.assertions.PlanAssert.assertPlan(PlanAssert.java:56) 2024-03-14T11:13:03.2060103Z at com.facebook.presto.sql.planner.assertions.PlanAssert.assertPlan(PlanAssert.java:40) 2024-03-14T11:13:03.2062121Z at