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

Running affected strategy on assertj executes almost all test cases #166

Closed
lordofthejars opened this Issue Sep 19, 2017 · 1 comment

Comments

Projects
None yet
2 participants
@lordofthejars
Member

lordofthejars commented Sep 19, 2017

Issue Overview

Running affected strategy on assertj executes almost all test cases instead of the affected ones

Expected Behaviour

Just run a few of tests involving the modification

Current Behaviour

Runs almost all test cases

Steps To Reproduce
  1. git clone https://github.com/joel-costigliola/assertj-core.git
  2. Modify: method of src/main/java/org/assertj/core/extractor/ByNameMultipleExtractor.javawith reverse call:
private List<Object> extractValues(T input, List<Extractor<T, Object>> singleExtractors) {
    List<Object> values = new ArrayList<>();

    for (Extractor<T, Object> extractor : singleExtractors) {
      values.add(extractor.extract(input));
    }
    Collections.reverse(values);
    return values;
  }
  1. Run mvn clean test -Dsmart.testing="affected"

And 9k tests are run

Additional Information

Anything relevant to help us resolving the problem. For example if you are using mvn you can share output for mvn --version as well as dependencies in use mvn dependency:tree. OS as well as JDK version would be helpful too.

For long outputs such as stacktraces please use HTML5 <details>

<details>
 <summary>$mvn --version</summary>
 Maven home: /usr/share/maven/latest
 Java version: 1.7.0_79, vendor: Oracle Corporation
 Java home: /usr/java/jdk1.7.0_79/jre
 Default locale: en_US, platform encoding: UTF-8
 OS name: "linux", version: "4.7.7-200.fc24.x86_64", arch: "amd64", family: "unix"
</details>
@lordofthejars

This comment has been minimized.

Show comment
Hide comment
@lordofthejars

lordofthejars Sep 20, 2017

Member

It is not a bug, this is how AssertJ is designed having some kind of "god" class used in most cases. The partial solution to implement is create a flag to disable transitivity.

Member

lordofthejars commented Sep 20, 2017

It is not a bug, this is how AssertJ is designed having some kind of "god" class used in most cases. The partial solution to implement is create a flag to disable transitivity.

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