-
Notifications
You must be signed in to change notification settings - Fork 39
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
[FSSDK-10505] chore: update mockito and java version #502
Conversation
- java version update to 17
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 with few small comments
...dler/src/androidTest/java/com/optimizely/ab/android/datafile_handler/DatafileWorkerTest.java
Outdated
Show resolved
Hide resolved
@@ -76,7 +76,8 @@ ext { | |||
jacksonversion= "2.11.2" | |||
annotations_ver = "1.2.0" | |||
junit_ver = "4.12" | |||
mockito_ver = "1.10.19" | |||
mockito_ver = "4.11.0" | |||
mockito_ver_sdk_module = "3.6.28" |
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.
curious, why are we using different version for this?
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.
Android sdk module uses PowerMock which is built based on Mockito Core. The last supported version of PowerMock is Mockito 3.6.28
.
return null; | ||
} | ||
}).when(manager.getDatafileHandler()).downloadDatafile(any(Context.class), any(DatafileConfig.class), any(DatafileLoadedListener.class)); | ||
ArgumentCaptor<Context> contextCaptor = ArgumentCaptor.forClass(Context.class); |
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 like the same setup is done in many places. Would it be good to move that out to a separate private method?
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.
My focus was to update the gradle and java version. We can make the improvement in another PR.
assertEquals(data.getString("url"), host); | ||
assertEquals(data.getString("body"), smallBody); | ||
assertNull(data.getByteArray("bodyCompressed")); | ||
Data data = EventWorker.compressEvent(host, smallBody); |
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.
NIT: should be indented two spaces less
Test plan
Issues