Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(CLI): Fixing RemoteTraversalServiceIT intermittent tests #27527

Merged

Conversation

jgambarios
Copy link
Contributor

@jgambarios jgambarios commented Feb 6, 2024

#27540
This fix involves refactoring our existing asynchronous task execution model to leverage ManagedExecutor. This change will ensure that context is properly captured and propagated across asynchronous boundaries, maintaining consistent behavior across our application.

Specific changes include:

  • Replacing direct usage of CompletableFuture and other native Java concurrency mechanisms with ManagedExecutor.
  • Ensuring all asynchronous tasks are submitted through ManagedExecutor for execution.
  • Adjusting unit and integration tests to account for the new asynchronous execution model.
  • Multiple changes requested by sonarlint.

Modified the dotCMS remote location traversal process to incorporate parallel execution of tasks using a ManagedExecutor. Removed unnecessary imports, adjusted the exception handling methods, enhanced test stability by sorting files and folders before assertion, and other necessary logic modifications.
…ava concurrency mechanisms with ManagedExecutor
…ava concurrency mechanisms with ManagedExecutor
…` class to return an empty map instead of null allowing proper comparison between local descriptors and server content types.
Moved common functionality of FilesTree and FilesLs into new AbstractFilesListingCommand for code reuse and simplified their implementations appropriately. The changes aim to improve maintainability and code clarity by avoiding repetition.
Glob pattern options for including or excluding files and folders have been refactored into a mixin class, FilesGlobMixin. This change enhances code reusability and modularity, making the pattern options more accessible across different classes without the need for replication.
@nollymar nollymar added this pull request to the merge queue Feb 14, 2024
Merged via the queue into master with commit 3bd21f7 Feb 14, 2024
14 checks passed
@nollymar nollymar deleted the issue-26633-CLI-Fix-blinking-test-RemoteTraversalServiceIT branch February 14, 2024 22:04
Copy link

Quality Gate failed Quality Gate failed

Failed conditions
5.1% Duplication on New Code (required ≤ 3%)

See analysis details on SonarQube

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CLI: Context Propagation Error in Asynchronous Task Execution CLI: Fix blinking test ContentTypeCommandIT
3 participants