I found several JFreechart's （the latest release 1.0.15) unit tests fail unexpected when executed in a different, non-default order. Here is an example:
passes when executed in its default order. (e.g., executing all tests in SegmentedTimelineTests together)
However, when I re-order the test execution, I found this test fails suspiciously when executed after: org.jfree.chart.axis.junit.SegmentedTimelineTests2.test6
In other words, if you just run:
The later test fails (which I think should pass).
Ideally, each unit test's execution should never affect other tests' results. This is so important to make a unit test's behavior consistently.
Dear JFreechart developers, can you please confirm or refute the above finding, to check whether this behavior is intended or not? or does it reveal a bug in JFreechart, or simply it reveals some smell in the test code?
(I have a couple more tests, if you are interested, I am happy to post them here).
Thanks a lot
Log in to post a comment.