Skip to content

Conversation

@JiangJi
Copy link

@JiangJi JiangJi commented Nov 20, 2017

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.

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.
@thelinuxfoundation
Copy link

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,
The Linux Foundation CLA GitHub bot

@JiangJi JiangJi changed the title testing: replace deprecated truth.FailureStrategy with FailureMetadata. testing: replace deprecated truth.FailureStrategy with truth.FailureMetadata. Nov 20, 2017
@carl-mastrangelo
Copy link
Contributor

@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

@JiangJi
Copy link
Author

JiangJi commented Nov 21, 2017

@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..
The latest build is still failing due to more deprecated api in other file (https://travis-ci.org/grpc/grpc-java/builds/305118909), please let me know if I should suppress them in this change as well, thanks!

@ejona86
Copy link
Member

ejona86 commented Nov 21, 2017

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.

@ejona86
Copy link
Member

ejona86 commented Nov 21, 2017

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.

@JiangJi
Copy link
Author

JiangJi commented Nov 22, 2017

@ejona86 Thank you for sharing the insights and #3786.

Is this PR not necessary anymore or I should wait for the above one to be merged and apply this change to the moved subject?

@ejona86
Copy link
Member

ejona86 commented Nov 22, 2017

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).

@JiangJi
Copy link
Author

JiangJi commented Nov 22, 2017

Thank you so much for taking care of this, closing this one.

@JiangJi JiangJi closed this Nov 22, 2017
@lock lock bot locked as resolved and limited conversation to collaborators Jan 20, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants