Skip to content

Conversation

@Jinzhengxu
Copy link
Contributor

@Jinzhengxu Jinzhengxu commented Dec 16, 2022

What is the purpose of the change

Nondex is a tool that helps improve the reliability and security of Java applications by detecting and eliminating nondeterministic behavior. This is accomplished through a combination of static analysis, runtime instrumentation, and data collection.

One of the main advantages of using nondex is that it can help identify and fix issues that are difficult to reproduce and debug. It can also help prevent security vulnerabilities by identifying and eliminating potential exploits that rely on nondeterministic behavior.

The purpose of adding nondex to the maven build section is to allow developers to easily incorporate this tool into their build and testing process. This will help ensure that the application is as reliable and secure as possible, providing value to both developers and users.AVRO-3691

Run the mvn nondex:nondex command can discover two flaky tests. These tests have now been fixed in PR AVRO-3690 and AVRO-3689.

Run the command mvn nondex:nondex -DnondexRuns=10, NonDex can found more flaky tests that were not detected by the initial run.

Verifying this change

This change is a trivial rework / code cleanup without any test coverage.

Documentation

  • Does this pull request introduce a new feature? (no)
  • If yes, how is the feature documented? (not applicable)

@github-actions github-actions bot added the build label Dec 16, 2022
Copy link
Contributor

@clesaec clesaec left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM : a new quality check tools is nice.

Copy link
Member

@martin-g martin-g left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMO this to be useful we should add edu.illinois:nondex-maven-plugin:2.1.1:nondex to the mvn ... call in the Github Actions Java workflow

@Jinzhengxu
Copy link
Contributor Author

Hi @martin-g. Thanks for your suggestion. I have created a new GitHub action workflow for Nondex.

@martin-g
Copy link
Member

@Jinzhengxu I am afraid the PR could not be merged until all tests pass successfully.

@clesaec
Copy link
Contributor

clesaec commented Jan 17, 2023

The issue comes from that the tested java class "Company" use HashMap, which does not guaranted to keep insert ordering. So replacing HashMap by LinkedHashMap (and same for caller) should solve it (and this also shows utility of nondex which found a bug in unit test code :))

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants