-
Notifications
You must be signed in to change notification settings - Fork 31
Fixed integration tests #22
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
Conversation
… CI. Trying some delays to check if that's enough
|
KafkaProducerSimpleConsumerTest dosn't fail on local runs but failed on CI. I added couple of delays, it worked. KafkaApisTest passes now. Failing integration test is org.apache.pulsar.spark.SparkStreamingPulsarReceiverTest, can be addressed separately |
lhotari
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
|
also fixed SparkStreamingPulsarReceiverTest |
|
@codelipenghui @sijie Please review. This PR makes CI green and we should then be ready for the 2.8.0 release of pulsar-adapters. |
codelipenghui
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me, just left a minor comment about the test.
| producer.send(message); | ||
| } | ||
| producer.close(); | ||
| Thread.sleep(500); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's better to avoid using sleep in the test, could you please use Awaitility instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree that it would be nice, but I suggest we merge this to unblock the release + add an issue to fix it later (it will take time to figure out what to wait for specifically, especially given that this test failed only on CI and passed on local runs) + there are other tests that rely on sleep: https://github.com/apache/pulsar-adapters/search?q=Thread.Sleep
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am fine for keeping Sleep for now.
it is not clear what we have to wait for at the moment
eolivelli
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am fine with the current approach, especially if @dlg99 will follow up and create an issue to remove the Thread.sleep
| producer.send(message); | ||
| } | ||
| producer.close(); | ||
| Thread.sleep(500); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am fine for keeping Sleep for now.
it is not clear what we have to wait for at the moment
|
@codelipenghui |
Motivation
KafkaApiTest is failing
Modifications
conversion between Pulsar topic name and Kafka TopicPartition ended up with TopicPartition using name with "-partition-"
Seek was not working correctly:
PulsarKafkaConsumer seeks to beginning, as asked.
Clears lastReceivedOffset in the process.
on poll it checks
seek didn't update unpolledPartitions - reset offset uses default strategy to reset => seeks to the end
Verifying this change
(Please pick either of the following options)
This change is already covered by existing tests, such as KafkaApiTest.
Does this pull request potentially affect one of the following parts:
If
yeswas chosen, please highlight the changesNo
Documentation