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

Junit tests with mandatory order fail randomly on jdk7 #134

Open
mdutoo opened this issue Jul 23, 2013 · 0 comments
Open

Junit tests with mandatory order fail randomly on jdk7 #134

mdutoo opened this issue Jul 23, 2013 · 0 comments

Comments

@mdutoo
Copy link
Member

mdutoo commented Jul 23, 2013

Junit tests where test methods must be executed in the defined manner (such as WSDLParsingTest) fail in a non deterministic manner on jdk7.

Cause :
Class.getDeclaredMethods() returns random ordered results since jdk7 : http://sourceforge.net/p/jumble/bugs/10/

Solution :

  • DONE First, for each failing test, try to drop the global @RepositoryConfig(cleanup = Granularity.CLASS) if any (which otherwise keeps state between methods and may make such additional unwanted state to break tests, such as when update...() is called before ...simple...() in EndpointStateServiceTest).
  • TODO This good practice of true unitarian tests should further be done on as many tests as possible,
  • DONE and documented on abstract test helpers.

Else if it tests consecutive steps of a whole (such as WSDLParsingTest) :

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

No branches or pull requests

1 participant