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

fix: band-aid around RestQueryTranslationTest #3326

Merged
merged 1 commit into from
Sep 11, 2019

Conversation

agavra
Copy link
Contributor

@agavra agavra commented Sep 11, 2019

Description

We've had RestQueryTranslationTest fail a few times due to:

**Caused by: org.apache.kafka.common.errors.TopicExistsException: Topic 'test_topic' already exists.**

According to @big-andy-coates:

There's a race condition inherent in Kafka when deleting topics.
When you delete a topic it is delete async. Once the delete has been requested the topic info is no longer available. So no way of knowing when it's been deleted. Any attempt to recreate causes a 'topic exists' exception.

This PR simply puts a band-aid around that by retrying if there's a TopicExistsException.

Testing done

  • Ran the test successfully locally and saw the log line:
[2019-09-11 10:46:29,830] WARN Retrying test after 5 SECONDS due to: Failed to create topic:test_topic (io.confluent.ksql.integration.Retry:135)

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 #")

@agavra agavra requested a review from a team as a code owner September 11, 2019 17:48
@stevenpyzhang
Copy link
Member

LGTM, thanks @agavra

@agavra agavra merged commit 677e03c into confluentinc:master Sep 11, 2019
@agavra agavra deleted the rest_flaky branch September 11, 2019 18:40
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.

2 participants