Bug #100148

Unreliable end-to-end tests

Added by Michael Plass about 1 month ago. Updated 27 days ago.

Status:Resolved Start:07/13/2010
Priority:Med (P3) Due date:
Assigned to:Jim Thornton % Done:

100%

Category:lib-java
Target version:-

Description

The JUnit end-to-end tests in EndToEndTestSource and EndToEndTestSink will fail if they are run in the opposite order as each other. That is, EndToEndTestSink.gets() needs to run when EndToEndTestSource.puts() is running, and EndToEndTestSink.server() needs to run when EndToEndTestSource.server() is running.

But JUnit make no guarantees about the ordering of the tests.

Associated revisions

Revision 9b9c5798f4cb19f44395db7aeabdc138114cbbba
Added by Michael Plass about 1 month ago

Run the EndToEndTests tests in consistent order.

The corresponding source and sink sides of the tests must be running
at the same time to work, so do all the tests in one junit so that
the order is forced.

refs #100148

History

Updated by Diana Smetters about 1 month ago

Yeah... JUnit used to have a TestSuite notion that allowed you to order tests, but it got removed for reasons I've never entirely understood.

Usually what we do if there are tests with strong order dependencies is to collapse them into a single actual @Test that simply runs the components in the right order. Not as many cool green JUnit checkmarks, but a lot less time wasted being mystified by tests that don't behave.

Updated by Michael Plass about 1 month ago

  • Status changed from New to Assigned
  • Assigned to set to Michael Plass
  • % Done changed from 0 to 80

Yup, that's what Rebecca said, too. I've got this fixed on a branch.

Updated by Michael Plass 27 days ago

  • Status changed from Assigned to Resolved
  • % Done changed from 80 to 100

In master.

Updated by Michael Plass 27 days ago

  • Assigned to changed from Michael Plass to Jim Thornton

Also available in: Atom PDF