trino icon indicating copy to clipboard operation
trino copied to clipboard

Fix flaky testFailStuckSplitTasks unit test

Open leetcode-1533 opened this issue 3 years ago • 0 comments

Description

Fix flaky testFailStuckSplitTasks unit test.

  1. Added wait for task executors to pick up tasks
  2. Close task executor after the unit test finished.

There is a race condition between unit test thread and the task executor thread. Added checking via settableFuture in the unit test thread to ensure task executor to process splits first.

Is this change a fix, improvement, new feature, refactoring, or other?

Fix

Is this a change to the core query engine, a connector, client library, or the SPI interfaces? (be specific)

Query Engine

How would you describe this change to a non-technical end user or system administrator?

Fix flaky testFailStuckSplitTasks unit test.

Related issues, pull requests, and links

https://github.com/trinodb/trino/pull/12392 https://github.com/trinodb/trino/issues/13437

Documentation

(x) No documentation is needed. ( ) Sufficient documentation is included in this PR. ( ) Documentation PR is available with #prnumber. ( ) Documentation issue #issuenumber is filed, and can be handled later.

Release notes

(x) No release notes entries required. ( ) Release notes entries required with the following suggested text:

# Section
* Fix some things. ({issue}`issuenumber`)

leetcode-1533 avatar Aug 01 '22 20:08 leetcode-1533