Skip to content

Test#10709

Open
pbadani wants to merge 1 commit intomasterfrom
pbadani/test
Open

Test#10709
pbadani wants to merge 1 commit intomasterfrom
pbadani/test

Conversation

@pbadani
Copy link
Member

@pbadani pbadani commented Mar 18, 2025

Description

What behavior do you want to change, why, how does your patch achieve the changes?

Testing done

Describe the testing strategy. Unit and integration tests are expected for any behavior changes.

Reviewer checklist

  • Ensure docs are updated if necessary. (eg. if a user visible feature is being added or changed).
  • Ensure relevant issues are linked (description should include text like "Fixes #")
  • Do these changes have compatibility implications for rollback? If so, ensure that the ksql command version is bumped.

Copilot AI review requested due to automatic review settings March 18, 2025 16:30
@pbadani pbadani requested a review from a team as a code owner March 18, 2025 16:30
@confluent-cla-assistant
Copy link

🎉 All Contributor License Agreements have been signed. Ready to merge.
Please push an empty commit if you would like to re-run the checks to verify CLA status for all contributors.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR introduces a forced delay in query execution within the REST test executor to allow persistent queries enough time to process inputs before sending query statements.

  • A Thread.sleep(100) delay is added before executing the query statements.
  • InterruptedException is caught and wrapped in a RuntimeException.

final List<RqttResponse> queryResults = sendQueryStatements(testCase, statements.queries,
try {
Thread.sleep(100);
} catch (InterruptedException e) {
Copy link

Copilot AI Mar 18, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider restoring the thread's interrupted status inside the catch block (e.g., calling Thread.currentThread().interrupt()) before throwing the RuntimeException to ensure proper interruption propagation.

Suggested change
} catch (InterruptedException e) {
} catch (InterruptedException e) {
Thread.currentThread().interrupt();

Copilot uses AI. Check for mistakes.

final List<RqttResponse> queryResults = sendQueryStatements(testCase, statements.queries,
try {
Thread.sleep(100);
Copy link

Copilot AI Mar 18, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] The hard-coded delay of 100ms might be arbitrary; consider extracting this value as a named constant or adding a comment to explain its significance, ensuring future maintainability.

Suggested change
Thread.sleep(100);
Thread.sleep(QUERY_PROCESSING_DELAY_MS);

Copilot uses AI. Check for mistakes.
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.

1 participant