question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Regression with InOrder verification after #2369

See original GitHub issue

The following test starts failing after https://github.com/mockito/mockito/commit/123beb8311ed6303ba71d682cff8434fe36b7f0f. It looks like the change to call actual equals and hashCode methods is catching a call to equals inside the implementation of InOrder.

package com.test;

import static org.mockito.Mockito.inOrder;
import static org.mockito.Mockito.spy;

import org.junit.Test;
import org.mockito.InOrder;

public class AppTest {

  static class Foo {
    void foo() {}
  }

  @Test
  public void test() {
    Foo mock1 = spy(new Foo());
    Foo mock2 = spy(new Foo());
    mock1.foo();
    InOrder order = inOrder(mock1, mock2);
    order.verify(mock1).foo();
    order.verifyNoMoreInteractions();
  }
}
No interactions wanted here:
-> at com.test.AppTest.test(AppTest.java:22)
But found this interaction on mock 'foo':
-> at java.base/java.util.LinkedList.indexOf(LinkedList.java:609)
	at com.test.AppTest.test(AppTest.java:22)

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
TimvdLippecommented, Aug 20, 2021

3.12.1 is currently being pushed to Maven Central. It should be available in a couple of hours.

0reactions
smcvbcommented, Aug 23, 2021

Thanks for the quick fix here, @TimvdLippe. I can confirm that 3.12.1 solved the aforementioned problem for Axon Framework.

Read more comments on GitHub >

github_iconTop Results From Across the Web

STATS 361: Causal Inference - Stanford University
Today's lecture is about estimation of average treatment effects in RCTs in terms of the potential outcomes model, and discusses the role of...
Read more >
lassopack: Model Selection and Prediction with Regularized ...
In the context of regularized regression, cross-validation can be used to select the tuning parameters that yield the best performance, e.g., ...
Read more >
Distribution-Free Predictive Inference for Regression
We develop a general framework for distribution-free predictive inference in regres- sion, using conformal inference. The proposed methodology allows for ...
Read more >
Regression methods for investigating risk factors of chronic ...
Papers were excluded if they investigated only (i) non CKD outcomes in patients with kidney disease or outcomes occurring after kidney ...
Read more >
Double-Lasso Regression for Principled Variable Selection
(2014) (age, gender, marital status and income) as covariates, as well as several other variables and interactions. (Table 2). In the resulting model,...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found