[
https://issues.apache.org/jira/browse/HDDS-15448?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Attila Doroszlai resolved HDDS-15448.
-------------------------------------
Fix Version/s: 2.3.0
Resolution: Implemented
> Speed up retry-delay-bound tests in TestReconTaskControllerImpl
> ---------------------------------------------------------------
>
> Key: HDDS-15448
> URL: https://issues.apache.org/jira/browse/HDDS-15448
> Project: Apache Ozone
> Issue Type: Sub-task
> Components: Ozone Recon, test
> Reporter: Chi-Hsuan Huang
> Assignee: Chi-Hsuan Huang
> Priority: Major
> Labels: pull-request-available
> Fix For: 2.3.0
>
>
> After HDDS\-15269 removed the 30s stop\(\) hangs, TestReconTaskControllerImpl
> is down to \~26s. The remaining \~19s comes from tests that wait out real
> wall\-clock time. Address these in priority order, preferring changes that do
> NOT touch production code and only touching production where the change has
> independent value:# First \(no production change\): replace fixed sleeps with
> waitFor.
> * testFailedTaskRetryLogic \(\~3.1s\): Thread.sleep\(3000\) only waits for
> async processing to finish. Replace with GenericTestUtils.waitFor\(...\)
> polling \(testConsumeOMEvents already uses a CountDownLatch for this\). Pure
> win, no production change.
> # Next: make the retry\-count logic testable without the wall clock.
> * testNewRetryLogicWithMaxRetriesExceeded \(\~12.7s, 6x
> Thread.sleep\(2100\)\) and
> testProcessReInitializationEventWithTaskFailuresAndRetry \(\~3.4s\) wait out
> the RETRY\_DELAY\_MS \(2s\) gate in validateRetryCountAndDelay\(\), which
> mixes a time gate with retry counting. Prefer separating the time gate from
> the retry\-count check so the counting logic can be tested without sleeping,
> rather than adding a test\-only setter just to shorten the sleep.
> # Last \(only if there is operational value\): make RETRY\_DELAY\_MS
> configurable.
> * Consistent with the existing OZONE\_RECON\_TASK\_THREAD\_COUNT\_KEY and
> OZONE\_RECON\_OM\_EVENT\_BUFFER\_CAPACITY config keys in the same class,
> expose it as an OzoneConfiguration key \(default 2000\) so tests can set it
> near zero. This has independent tunability value and is not a test\-only hook.
> Expected: brings the class from \~26s down to a few seconds.
> Note: testBadBehavedTaskIsIgnored is currently @Disabled, so its sleeps do
> not affect runtime.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]