-
Notifications
You must be signed in to change notification settings - Fork 13.7k
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
MINOR: Fix remaining core, connect and clients tests to pass with Java 11 #5771
Conversation
- SslFactoryTest should use SslFactory to create SSLEngine - Use Mockito instead of EasyMock in ConsoleConsumerTest as one of the tests mocks a standard library class and EasyMock can't do that when Java 11 is used. SourceTaskOffsetCommitterTest in connect-runtime is the only test that still fails with Java 11.
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.
@ijuma Thanks for the PR. Left a minor comment, apart from that LGTM.
PowerMock.replayAll(); | ||
|
||
committer.schedule(taskId, task); | ||
assertTrue(taskWrapper.hasCaptured()); | ||
assertNotNull(taskWrapper.getValue()); | ||
assertEquals(Utils.mkMap(mkEntry(taskId, commitFuture)), committers); |
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.
mkMap and mkEntry are both statics in Utils
, why do we have static import for one and not the other? Anyway, perhaps this could just be Collections.singletonMap
?
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.
Good point, changed to use singletonMap
. Also removed some imports and an unnecessary @PrepareForTest.
One job passed and the other had an unrelated test failure: |
…a 11 (#5771) - SslFactoryTest should use SslFactory to create SSLEngine - Use Mockito instead of EasyMock in `ConsoleConsumerTest` as one of the tests mocks a standard library class and the latest released EasyMock version can't do that when Java 11 is used. - Avoid mocking `ConcurrentMap` in `SourceTaskOffsetCommitterTest` for similar reasons. As it happens, mocking is not actually needed here. Reviewers: Rajini Sivaram <rajinisivaram@googlemail.com>
…a 11 (apache#5771) - SslFactoryTest should use SslFactory to create SSLEngine - Use Mockito instead of EasyMock in `ConsoleConsumerTest` as one of the tests mocks a standard library class and the latest released EasyMock version can't do that when Java 11 is used. - Avoid mocking `ConcurrentMap` in `SourceTaskOffsetCommitterTest` for similar reasons. As it happens, mocking is not actually needed here. Reviewers: Rajini Sivaram <rajinisivaram@googlemail.com>
ConsoleConsumerTest
as one ofthe tests mocks a standard library class and the latest released EasyMock
version can't do that when Java 11 is used.
ConcurrentMap
inSourceTaskOffsetCommitterTest
for similar reasons. As it happens, mocking is not actually needed here.
Committer Checklist (excluded from commit message)