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

ITKafkaIndexingServiceTest fixes #3872

Merged
merged 4 commits into from
Jan 22, 2017
Merged

ITKafkaIndexingServiceTest fixes #3872

merged 4 commits into from
Jan 22, 2017

Conversation

pjain1
Copy link
Member

@pjain1 pjain1 commented Jan 20, 2017

  • remove wait between sends
  • wait for ingestion to complete before querying
  • send fixed number of events
  • wait for all tasks to finish before firing kill task as loadstatus does not consider realtime segments

@pjain1
Copy link
Member Author

pjain1 commented Jan 20, 2017

@b-slim regarding your interrupted exception comment I think it is not necessary for integration test but let me know if you strongly think otherwise

@pjain1
Copy link
Member Author

pjain1 commented Jan 20, 2017

@b-slim nevermind changed the code to handle InterruptedException

Copy link
Contributor

@gianm gianm 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, had minor comments.


// these are used to compute the expected aggregations
int added = 0;
int num_events = 0;

// send data to kafka
while (dt.compareTo(dtStop) < 0) { // as long as we're within the time span
while (num_events < NUM_EVENTS_TO_SEND) { // as long as we're within the time span
Copy link
Contributor

Choose a reason for hiding this comment

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

The comment is no longer accurate since the event count is fixed now.

private static final String INDEXER_FILE = "/indexer/kafka_supervisor_spec.json";
private static final String QUERIES_FILE = "/indexer/kafka_index_queries.json";
private static final String DATASOURCE = "kafka_indexing_service_test";
private static final String TOPIC_NAME = "kafka_indexing_service_topic";
private static final int MINUTES_TO_SEND = 4;
private static final int NUM_EVENTS_TO_SEND = 60;
private static final long WAIT_TIME_MILIIS = 2 * 60 * 1000L;
Copy link
Contributor

Choose a reason for hiding this comment

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

Misspelled, should be WAIT_TIME_MILLIS

dtLast = dt;
dt = new DateTime(zone);
}

producer.close();

LOG.info("Waiting for [%s] millis for Kafka indexing tasks to consume events", WAIT_TIME_MILIIS);
Copy link
Contributor

Choose a reason for hiding this comment

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

Would be nicer to wait up to WAIT_TIME_MILLIS so if the tasks load faster than that, the test can exit earlier. But, this is fine for now, as ITs are not expected to be the fastest things in the world.

@pjain1
Copy link
Member Author

pjain1 commented Jan 21, 2017

@gianm took care of your comments

Copy link
Contributor

@gianm gianm left a comment

Choose a reason for hiding this comment

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

thx 👍

@fjy fjy removed this from the 0.10.0 milestone Jan 22, 2017
@fjy fjy merged commit 515caa8 into apache:master Jan 22, 2017
dgolitsyn pushed a commit to metamx/druid that referenced this pull request Feb 14, 2017
* remove wait between sends, wait for ingestion to complete before querying

send fixed number of events

more fixes

* handle interrupted exception

* remove while

* review comments
@pjain1 pjain1 deleted the det_int branch May 6, 2017 16:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants