Skip to content

Conversation

@Fly-Style
Copy link
Contributor

Description

This patch continues the effort to move query group tests to the embedded test suite, currently, we have migrated ITSqlCancelTest, ITSystemTableQueryTest, ITTwitterQueryTest.

Note: TLS-related tests require more effort to support, so we decided to implement them in subsequent patches.

This PR has:

  • been self-reviewed.
  • added integration tests.

@github-actions github-actions bot added the GHA label Dec 3, 2025
Copy link
Contributor

@kfaraz kfaraz left a comment

Choose a reason for hiding this comment

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

Thanks for the changes, @Fly-Style !
The tests look much better now.

I have left some minor suggestions. Please let me know what you think.

Comment on lines 70 to 88
// Add in the consecutive patch
// StringUtils.format(
// TLS_CONNECTION_TEMPLATE,
// config.getRouterTLSUrl(),
// sslConfig.getTrustStorePath(),
// sslConfig.getTrustStorePasswordProvider().getPassword(),
// sslConfig.getKeyStorePath(),
// sslConfig.getKeyStorePasswordProvider().getPassword(),
// sslConfig.getKeyManagerPasswordProvider().getPassword()
//),
// StringUtils.format(
// TLS_CONNECTION_TEMPLATE,
// config.getBrokerTLSUrl(),
// sslConfig.getTrustStorePath(),
// sslConfig.getTrustStorePasswordProvider().getPassword(),
// sslConfig.getKeyStorePath(),
// sslConfig.getKeyStorePasswordProvider().getPassword(),
// sslConfig.getKeyManagerPasswordProvider().getPassword()
// )
Copy link
Contributor

Choose a reason for hiding this comment

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

Please remove the commented out code. We can just add one line to the javadoc of this class that mentions that the TLS flavor for this test will be added later.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

dataLoaderHelper.waitUntilDatasourceIsReady("wikipedia");
dataLoaderHelper.waitUntilDatasourceIsReady("twitterstream");

tableName = ingestBasicData();
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: In Druid, we generally use the term datasource. Maybe rename this field to testDataSource or similar?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

Rename pending?

Comment on lines 66 to 67
// Wait until the sqlLifecycle is authorized and registered
Thread.sleep(500L);
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this needed in the embedded test framework too?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

In that case, unfortunately, yes. We need to give query some time to spin up :)

Copy link
Contributor

@kfaraz kfaraz Dec 4, 2025

Choose a reason for hiding this comment

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

oh, I see. Could you we wait on a metric instead, say sqlQuery/planningTimeMs?
There could be other metrics too which mark the execution start of the query.

Copy link
Contributor

@kfaraz kfaraz left a comment

Choose a reason for hiding this comment

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

Looks good! Only blocking comments are these:

  • Use ingestBasicData() in SystemTableQueryTest
  • Remove sleep() from SqlQueryCancelTest by using some appropriate metric

dataLoaderHelper.waitUntilDatasourceIsReady("wikipedia");
dataLoaderHelper.waitUntilDatasourceIsReady("twitterstream");

tableName = ingestBasicData();
Copy link
Contributor

Choose a reason for hiding this comment

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

Rename pending?

Comment on lines 136 to 147
URL url;
try {
url = new URL(endpoint);
}
catch (MalformedURLException e) {
throw new AssertionError("Malformed URL");
}

Request request = new Request(HttpMethod.POST, url);
request.addHeader("Content-Type", MediaType.APPLICATION_JSON);
request.setContent(query.getBytes(StandardCharsets.UTF_8));
return httpClientRef.go(request, StatusResponseHandler.getInstance());
Copy link
Contributor

Choose a reason for hiding this comment

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

We can try to augment the EmbeddedClusterApis to provide this functionality and also some API to cancel queries in a follow up PR. Not needed right now.

Copy link
Contributor

@kfaraz kfaraz left a comment

Choose a reason for hiding this comment

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

Thanks for fixing these up, @Fly-Style !
Happy to get rid of these ITs! 😛

@kfaraz
Copy link
Contributor

kfaraz commented Dec 5, 2025

HashPartitionMultiPhaseParallelIndexingTest is failing consistently on this PR.
It is definitely not related to this PR, but we need it to pass so that other checks can be performed.
Need to check if this test is failing on master too.

@kfaraz
Copy link
Contributor

kfaraz commented Dec 5, 2025

Merging this off as failures are unrelated.

@kfaraz kfaraz merged commit af4e63d into apache:master Dec 5, 2025
94 of 97 checks passed
kfaraz added a commit that referenced this pull request Dec 27, 2025
…dded tests (#18867)

Changes:
- Replace `ITAppendBatchIndexTest` with a new method in `IndexParallelTaskTest`
- Migrate `ITCustomCoordinatorDutiesTest` to embedded tests as `KillSupervisorsCustomDutyTest`
- Remove the following test groups since all the tests for that group have already been migrated
   - `input-source` (#18805, #18752)
   - `cds-task-schema-publish-disabled`
   - `cds-coordinator-metadata-query-disabled`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants