Skip to content
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

1.x Use IntelliJ IDE friendly assertion failure message #5258

Merged
merged 2 commits into from
Apr 2, 2017

Conversation

mtiidla
Copy link

@mtiidla mtiidla commented Apr 2, 2017

The assertItem failure message pattern in TestSubscriber does not match any of the regex patterns defined by IntelliJ to show <Click to see difference> link.
before

By changing the "expected to be" to "expected:", the pattern is recognised by IntelliJ and the helpful link is presented.
after

The original idea from #5249 was to use the "expected:<> but was:<>" pattern used in JUnit, but it is not picked up on its own by IntelliJ. The AssertionError must extend from JUnit's ComparisonFailure, to get it recognised. This however requires dependency on JUnit.
junit

So in the end, the fix is just a very simple change in the message.

@akarnokd akarnokd added this to the 1.3 milestone Apr 2, 2017
@codecov
Copy link

codecov bot commented Apr 2, 2017

Codecov Report

Merging #5258 into 1.x will decrease coverage by 0.03%.
The diff coverage is 0%.

Impacted file tree graph

@@             Coverage Diff              @@
##                1.x    #5258      +/-   ##
============================================
- Coverage     84.29%   84.25%   -0.04%     
- Complexity     2879     2880       +1     
============================================
  Files           290      290              
  Lines         18125    18125              
  Branches       2479     2479              
============================================
- Hits          15279    15272       -7     
- Misses         1974     1980       +6     
- Partials        872      873       +1
Impacted Files Coverage Δ Complexity Δ
src/main/java/rx/observers/TestSubscriber.java 81.81% <0%> (ø) 76 <0> (ø) ⬇️
...ain/java/rx/internal/operators/OnSubscribeAmb.java 79.13% <0%> (-5.04%) 13% <0%> (ø)
...n/java/rx/internal/operators/CachedObservable.java 83.69% <0%> (-1.09%) 6% <0%> (ø)
...ava/rx/internal/util/BackpressureDrainManager.java 67.9% <0%> (+1.23%) 21% <0%> (+1%) ⬆️
...n/java/rx/subscriptions/CompositeSubscription.java 76.62% <0%> (+1.29%) 24% <0%> (ø) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update bc40a84...5c236b8. Read the comment docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants