Uploaded image for project: 'CXF'
  1. CXF
  2. CXF-8087

unstable test environment caused by accessing system property without cleanup

    XMLWordPrintableJSON

Details

    • Test
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 3.3.2
    • 3.3.4
    • JAX-RS
    • Unknown

    Description

      JAXRSclientServerWebSocketTest is inherited by several tests. In one of its child tests( i.e. JAXRSClientServerWebSocketNoAtmosphereTest), system property is set to true in the test fixture.  However, none test cases or fixture reset the modified system property after the completion of a test run. 

      Result: test results may become flaky and unstable in multiple test runs

       

      public class JAXRSClientServerWebSocketNoAtmosphereTest extends JAXRSClientServerWebSocketTest {	
          @BeforeClass
          public static void startServers() throws Exception {
      	System.setProperty("org.apache.cxf.transport.websocket.atmosphere.disabled", "true");
      	AbstractResourceInfo.clearAllMaps();
      	assertTrue("server did not launch correctly", launchServer(new BookServerWebSocket(PORT)));
      	createStaticBus();
          }
      	
          @AfterClass
          public static void cleanup() {
      	//System.clearProperty("org.apache.cxf.transport.websocket.atmosphere.disabled");
          }
      

      Attachments

        Activity

          People

            coheigea Colm O hEigeartaigh
            zhouyapengzi zi peng
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: