Conversation
| try { | ||
| classPathResult.formatDependencyPaths(ImmutableList.of(jarB)); | ||
| fail("The irrelevant JAR file should be invalidated."); | ||
| } catch (IllegalArgumentException expected) { |
There was a problem hiding this comment.
With this PR, the method doesn't throw IllegalArgumentException any more.
There was a problem hiding this comment.
We have examples of capturing output, if you still want to test that the warning was printed: https://github.com/GoogleCloudPlatform/spring-cloud-gcp/blob/366b3d9530efda9b9b1e7dcd92d0284a38034c25/spring-cloud-gcp-samples/spring-cloud-gcp-integration-pubsub-sample/spring-cloud-gcp-integration-pubsub-sample-receiver/src/test/java/com/example/ReceiverIntegrationTest.java#L68-L71
There was a problem hiding this comment.
The warning is not critical message. I keep as it is.
| try { | ||
| classPathResult.formatDependencyPaths(ImmutableList.of(jarB)); | ||
| fail("The irrelevant JAR file should be invalidated."); | ||
| } catch (IllegalArgumentException expected) { |
There was a problem hiding this comment.
We have examples of capturing output, if you still want to test that the warning was printed: https://github.com/GoogleCloudPlatform/spring-cloud-gcp/blob/366b3d9530efda9b9b1e7dcd92d0284a38034c25/spring-cloud-gcp-samples/spring-cloud-gcp-integration-pubsub-sample/spring-cloud-gcp-integration-pubsub-sample-receiver/src/test/java/com/example/ReceiverIntegrationTest.java#L68-L71
| "Circular dependency for: " | ||
| + resolvedDependencyResult | ||
| + "\n The stack is: " | ||
| + ImmutableList.copyOf(stack)); |
There was a problem hiding this comment.
Probably don't need the defensive copy here.
There was a problem hiding this comment.
That's right. Removed.
Rather than failing completely upon unexpected values/conditions, this PR shows the partial results.