Conversation
|
🎉 All Contributor License Agreements have been signed. Ready to merge. |
There was a problem hiding this comment.
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) { |
There was a problem hiding this comment.
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.
| } catch (InterruptedException e) { | |
| } catch (InterruptedException e) { | |
| Thread.currentThread().interrupt(); |
|
|
||
| final List<RqttResponse> queryResults = sendQueryStatements(testCase, statements.queries, | ||
| try { | ||
| Thread.sleep(100); |
There was a problem hiding this comment.
[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.
| Thread.sleep(100); | |
| Thread.sleep(QUERY_PROCESSING_DELAY_MS); |
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