[
https://issues.apache.org/jira/browse/IGNITE-27266?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Iurii Gerzhedovich updated IGNITE-27266:
----------------------------------------
Labels: MakeTeamcityGreenAgain ignite-3 (was: ignite-3)
> Sql. ItStatisticTest is flaky, SqlStatisticManagerImplTest is potentially
> flaky
> -------------------------------------------------------------------------------
>
> Key: IGNITE-27266
> URL: https://issues.apache.org/jira/browse/IGNITE-27266
> Project: Ignite
> Issue Type: Improvement
> Components: sql ai3
> Reporter: Maksim Zhuravkov
> Priority: Major
> Labels: MakeTeamcityGreenAgain, ignite-3
> Fix For: 3.2
>
>
> (1) Both `ItStatisticTest` and `SqlStatisticManagerImplTest` use
> `Awaitility` with a fixed timeout with can lead to test failure, even when
> both the code and the code is correct.
> (2) In case of `SqlStatisticManagerImplTest`, the time it takes for the test
> to complete is directly proportional to the specified statistics update
> interval. This happens because the test code uses an instance of
> ScheduledExecutorService to submit tasks and then observes side effects of
> their completion.
> To fix this for `SqlStatisticManagerImplTest` we can check that
> `SqlStatisticsManager` passes the correct value for `ScheduledExecutorService
> scheduleAtFixedRate`, and then run scheduled tasks in the same thread as the
> test code. We do not need to use `Awaitility` at all. This fixes both (1),
> flakiness of `SqlStatisticManagerImplTest `, and (2), (long running time).
> In case of `ItStatisticTest`, we can update `Awaitility timeout` to be some
> number larger than statistics update interval, it can simply be N times
> larger than that interval (dropping calculations from
> `calcStatisticUpdateIntervalMillis` as well).
--
This message was sent by Atlassian Jira
(v8.20.10#820010)