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

Patch for the ITs for MSQ #1

Open
wants to merge 12 commits into
base: target-msq-first-it
Choose a base branch
from
Open

Conversation

LakshSingla
Copy link
Owner

Description

Fixed the bug ...

Renamed the class ...

Added a forbidden-apis entry ...

This PR has:

  • been self-reviewed.
  • added documentation for new or modified features or behaviors.
  • added Javadocs for most classes and all non-trivial methods. Linked related entities via Javadoc links.
  • added or updated version, license, or notice information in licenses.yaml
  • added comments explaining the "why" and the intent of the code wherever would not be obvious for an unfamiliar reader.
  • added unit tests or modified existing tests to cover new code paths, ensuring the threshold for code coverage is met.
  • added integration tests.
  • been tested in a test Druid cluster.

paul-rogers and others added 8 commits August 16, 2022 23:45
Support for all of the IntegrationTestingConfig properties
Wrapper script for IT operations
Additional documentation
Build fix
Improved env var-based configuration
Test createion guide
Enable new ITs in travis
Parameterized tests
public void test() throws Exception
{
String query =
"INSERT INTO dst SELECT *\n"
Copy link

Choose a reason for hiding this comment

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

This should be picked up from a file using a http data source

Choose a reason for hiding this comment

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

It is not necessary to put queries in a file. Existing tests use files, but only because they have many queries. However, since this query is rather complex, it might be easier to maintain if it is in a file.

The existing format may not be a good fit for MSQ tests, so we might want to create a simplified form for use here.

String resultsQuery = "SELECT * FROM dst";
String resultsTaskId = msqHelper.submitMsqTask(resultsQuery);
msqHelper.pollTaskIdForCompletion(resultsTaskId, 0);
msqHelper.compareResults(resultsTaskId, new MsqQueryWithResults(
Copy link

Choose a reason for hiding this comment

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

Results should also be served from a file.

Choose a reason for hiding this comment

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

This is where we can use the existing format which holds both the query and expected results.

Copy link

@paul-rogers paul-rogers 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 this starter set of MSQ tests. Sorry you had to wrestle with the in-flight IT code.

Suggestion: shift your work to use the Apache Druid code. The IT stuff there had many last-minute tweaks and should now be a bit easier to use.

@@ -46,7 +46,7 @@ addons:
# Add various options to make 'mvn install' fast and skip javascript compile (-Ddruid.console.skip=true) since it is not
# needed. Depending on network speeds, "mvn -q install" may take longer than the default 10 minute timeout to print any
# output. To compensate, use travis_wait to extend the timeout.
install: ./check_test_suite.py && travis_terminate 0 || echo 'Running Maven install...' && MAVEN_OPTS='-Xmx3000m' travis_wait 15 ${MVN} clean install -q -ff -pl '!distribution,!:it-tools,!:it-image' ${MAVEN_SKIP} ${MAVEN_SKIP_TESTS} -T1C && ${MVN} install -q -ff -pl 'distribution' ${MAVEN_SKIP} ${MAVEN_SKIP_TESTS}
install: ./check_test_suite.py && travis_terminate 0 || echo 'Running Maven install...' && MAVEN_OPTS='-Xmx3000m' travis_wait 15 ${MVN} clean install -q -ff -pl '!distribution,!:druid-it-tools,!:druid-it-image,!:druid-it-cases' ${MAVEN_SKIP} ${MAVEN_SKIP_TESTS} -T1C && ${MVN} install -q -ff -pl 'distribution' ${MAVEN_SKIP} ${MAVEN_SKIP_TESTS}

Choose a reason for hiding this comment

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

This should be fixed if you rebase on the latest Imply master.

name: "(Compile=openjdk8, Run=openjdk8) batch index integration test with Indexer (new)"
env: JVM_RUNTIME='-Djvm.runtime=8' USE_INDEXER='indexer'
script: ./it.sh travis BatchIndex

Choose a reason for hiding this comment

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

Suggestion: now that MSQ and the IT code is in Apache master, change this PR to work off of Apache. That way, you can wait for me to merge the Jenkins changes before attempting to run the tests in Imply. The Jenkins stuff was a real hassle: no reason for you to rediscover that pain.

```bash
mvn clean package -P dist,skip-static-checks,skip-tests -Dmaven.javadoc.skip=true -T1.0C
mvn clean package -P dist $MAVEN_IGNORE -T1.0C

Choose a reason for hiding this comment

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

In the run-up to the merge, this was all replaced with a script, since it became silly to keep copy/pasting the same command lines over & over. You'll get that benefit when you rebase.

file: ../Common/druid.yaml
service: broker
environment:
- DRUID_INTEGRATION_TEST_GROUP=${DRUID_INTEGRATION_TEST_GROUP}

Choose a reason for hiding this comment

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

This environment variable is no longer needed. At present, nothing in the container makes use of the test group.

config:
- subnet: 172.172.172.0/24

services:

Choose a reason for hiding this comment

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

This cluster looks pretty generic. It seems to be basically the same as BatchIndex. Seems we should define a generic cluster setup then point this test (and BatchIndexer and InputFormat) at that definition. I've made a note to clean this up.

public void test() throws Exception
{
String query =
"INSERT INTO dst SELECT *\n"

Choose a reason for hiding this comment

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

It is not necessary to put queries in a file. Existing tests use files, but only because they have many queries. However, since this query is rather complex, it might be easier to maintain if it is in a file.

The existing format may not be a good fit for MSQ tests, so we might want to create a simplified form for use here.

String resultsQuery = "SELECT * FROM dst";
String resultsTaskId = msqHelper.submitMsqTask(resultsQuery);
msqHelper.pollTaskIdForCompletion(resultsTaskId, 0);
msqHelper.compareResults(resultsTaskId, new MsqQueryWithResults(

Choose a reason for hiding this comment

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

This is where we can use the existing format which holds both the query and expected results.

# druid.test.config.dockerIp is used by some older test code. Remove
# it when that code is updated.
properties:
druid.global.http.numMaxThreads: 3

Choose a reason for hiding this comment

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

Most of these properties are not needed by this test. And, some of these are a bit of a confusion: these properties are for the test client, not the server. Only the thread settings are needed, and only to keep the client from creating a large number of threads which clutter the IDE experience unnecessarily.

@LakshSingla
Copy link
Owner Author

@paul-rogers Thanks for the review. I have opened the PR in apache/druid/master apache#12992. Apologies for the confusion and not intimating this earlier. I will try to incorporate the review comments from this PR there.

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.

3 participants