prestodb / presto

The official home of the Presto distributed SQL query engine for big data
http://prestodb.io
Apache License 2.0
15.74k stars 5.28k forks source link

[native] Fix TaskManagerTest.buildSpillDirectoryFailure #23098

Closed spershin closed 2 days ago

spershin commented 3 days ago

Description

There is a race in the test itself, which we fix here:

Fixes https://github.com/prestodb/presto/issues/23062

Test Plan

Stress testing. buck2 test @mode/opt github/presto-trunk/presto-native-execution/presto_cpp/main/tests:presto_main_test -- TaskManagerTest.buildSpillDirectoryFailure --stress-runs 100

== NO RELEASE NOTE ==
tanjialiang commented 3 days ago

Thanks for the fix. Does it make sense to just extend the test from velox's OperatorTestBase and reuse the rich utilities there?

spershin commented 3 days ago

@tanjialiang This test fixes the use of TaskManager's cleanOldTasks(). TaskManager is not in Velox, so we cannot use rich utilities from Velox.