-
Notifications
You must be signed in to change notification settings - Fork 3.9k
testing: replace deprecated truth.FailureStrategy with truth.FailureMetadata. #3779
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
Truth.FailureStrategy & SubjectFactory is being deprecated and will be removed in next release. This changed reference of those classes to use 'FailureMetadata' and 'Subject.Factory' respectively. New api is added in Truth-0.36, dependency is in build.gradle is also updated to use this version of Truth.
|
Thank you for your pull request. Before we can look at your contribution, we need to ensure all contributors are covered by a Contributor License Agreement. After the following items are addressed, please respond with a new comment here, and the automated system will re-verify.
Regards, |
|
@JiangJi Can you supress the appropriate Deprecation notices? You can see the build log failure here: https://travis-ci.org/grpc/grpc-java/builds/304537588?utm_source=github_status&utm_medium=notification |
|
@carl-mastrangelo Thanks for the review, I've updated the code to use the recommended API (actual() & actualAsString() ) for those two deprecated ones rather than suppress the warning, hope that's OK.. |
|
I started work with this in ejona86@85d6efa , but I put it on hold because the bumped Truth dep bumps Guava which is a bit dangerous. In 1.8 we marked DeadlineSubject as Experimental. I'm tempted to remove it because the Truth dep causes problems (we want Truth in our tests, but triggering guava upgrades for everyone is a problem). Earlier I was going to hold off until we updated Guava, which I was wanting to do soon. But that'd take a quarter or so to come to fruition (I want to do it over multiple releases), assuming it didn't get rolled back. |
|
I think we should move DeadlineSubject to our internal code, out of the testing artifact. It has very few users (maybe 0). The testing artifact will still need to depend on Truth (some of the other classes use it), but there won't be any Subjects. We can then upgrade Truth in our internal tests. I'll work on some PRs. |
|
This looks virtually identical to my commit, but after the changes the TestServiceClient changes in my commit won't be necessary any more. It doesn't really matter which commit we use at this point, but I can take it from here (even if I just update this PR to handle the rename). |
|
Thank you so much for taking care of this, closing this one. |
Truth.FailureStrategy & SubjectFactory is being deprecated and will be removed in next release.
This changed reference of those classes to use 'FailureMetadata' and 'Subject.Factory' respectively.
New api is added in Truth-0.36, dependency is in build.gradle is also updated to use this
version of Truth.