glassfish
  1. glassfish
  2. GLASSFISH-19637

[QL Test][admincli_tests]test.admincli.RestartDomainTests failed

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.0_b75
    • Component/s: admin
    • Labels:
      None
    • Environment:

      1 Windows XP
      2 current trunk snapshot

      Description

      Hi Tom

      Today, while I run appserver QL tests, only the following test failed,

      <test name="admincli_tests">
      <class name="test.admincli.ExistStatusTests">
      <test-method status="PASS" signature="deleteJDBCPool()" name="deleteJDBCPool" duration-ms="953" started-at="2013-02-05T14:55:48Z" depends-on-methods="test.admincli.ExistStatusTests.pingJDBCPool" finished-at="2013-02-05T14:55:49Z">
      </test-method>
      <test-method status="PASS" signature="pingJDBCPool()" name="pingJDBCPool" duration-ms="1906" started-at="2013-02-05T14:55:46Z" depends-on-methods="test.admincli.ExistStatusTests.createJDBCPool" finished-at="2013-02-05T14:55:48Z">
      </test-method>
      <test-method status="PASS" signature="createJDBCPool()" name="createJDBCPool" duration-ms="1000" started-at="2013-02-05T14:55:45Z" finished-at="2013-02-05T14:55:46Z">
      </test-method>
      </class>
      <class name="test.admincli.RestartDomainTests">
      <test-method status="FAIL" signature="restartDomainTest()" name="restartDomainTest" duration-ms="0" started-at="2013-02-05T14:55:49Z" finished-at="2013-02-05T14:55:49Z">
      <exception class="java.lang.AssertionError">
      <message>
      <![CDATA[Restart domain failed. expected:<true> but was:<false>]]>
      </message>
      <full-stacktrace>
      <![CDATA[java.lang.AssertionError: Restart domain failed. expected:<true> but was:<false>
      at org.testng.Assert.fail(Assert.java:84)
      at org.testng.Assert.failNotEquals(Assert.java:438)
      at org.testng.Assert.assertEquals(Assert.java:108)
      at org.testng.Assert.assertEquals(Assert.java:239)
      at test.admincli.RestartDomainTests.parseTestResults(RestartDomainTests.java:90)
      at test.admincli.RestartDomainTests.restartDomainTest(RestartDomainTests.java:62)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:601)
      at org.testng.internal.MethodHelper.invokeMethod(MethodHelper.java:604)
      at org.testng.internal.Invoker.invokeMethod(Invoker.java:470)
      at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:564)
      at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:830)
      at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:125)
      at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:109)
      at org.testng.TestRunner.runWorkers(TestRunner.java:678)
      at org.testng.TestRunner.privateRun(TestRunner.java:624)
      at org.testng.TestRunner.run(TestRunner.java:495)
      at org.testng.SuiteRunner.runTest(SuiteRunner.java:300)
      at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:295)
      at org.testng.SuiteRunner.privateRun(SuiteRunner.java:275)
      at org.testng.SuiteRunner.run(SuiteRunner.java:190)
      at org.testng.TestNG.createAndRunSuiteRunners(TestNG.java:792)
      at org.testng.TestNG.runSuitesLocally(TestNG.java:765)
      at org.testng.TestNG.run(TestNG.java:699)
      at org.testng.TestNG.privateMain(TestNG.java:824)
      at org.testng.TestNG.main(TestNG.java:802)
      ]]>

      Could you please confirm the issue?

      Thanks
      --Tang

        Activity

        Hide
        TangYong added a comment -

        BTW: The issue has been existed for long time.

        Show
        TangYong added a comment - BTW: The issue has been existed for long time.
        Hide
        Tom Mueller added a comment -

        Is this test failure reliably repeatable or does it only happen occasionally?
        Also, even though the stop-domain command fails, is the DAS actually stopped?

        We have been seeing test failures with stop-local-instance that are similar on Windows and have not yet been able to diagnose the problem. In those failures, the instance is actually stopped, but stop-local-instance reports a failure.

        Show
        Tom Mueller added a comment - Is this test failure reliably repeatable or does it only happen occasionally? Also, even though the stop-domain command fails, is the DAS actually stopped? We have been seeing test failures with stop-local-instance that are similar on Windows and have not yet been able to diagnose the problem. In those failures, the instance is actually stopped, but stop-local-instance reports a failure.
        Hide
        TangYong added a comment -

        Tom

        >Is this test failure reliably repeatable or does it only happen occasionally?
        >Also, even though the stop-domain command fails, is the DAS actually stopped?

        The issue can be re-produced 100%. And not only in my env, in jeremy's env, the issue has been also re-produced.

        Tang

        Show
        TangYong added a comment - Tom >Is this test failure reliably repeatable or does it only happen occasionally? >Also, even though the stop-domain command fails, is the DAS actually stopped? The issue can be re-produced 100%. And not only in my env, in jeremy's env, the issue has been also re-produced. Tang
        Hide
        Jeremy_Lv added a comment -

        Tom

        >Is this test failure reliably repeatable or does it only happen occasionally?
        >Also, even though the stop-domain command fails, is the DAS actually stopped?

        The issue can be re-produced 100%. And not only in my env, in jeremy's env, the issue has been also re-produced.

        Tang

        yes, it can be reproduced in my env, The detailed information are as follows:

           [testng] [Parser] Running:
           [testng]   E:\GF_MAIN\SOURCE_0108\appserver\tests\quicklook\testng\testng_gd.
        xml
           [testng]
           [testng] RtExec.execute: e:\glassfish3\glassfish\bin\asadmin.bat create-jdbc-
        connection-pool --datasourceclassname=org.apache.derby.jdbc.ClientDataSource --p
        roperty DatabaseName=sun-appserv-samples:PortNumber=1527:serverName=localhost:Pa
        ssword=APP:User=APP QLJdbcPool
           [testng] RtExec.execute: e:\glassfish3\glassfish\bin\asadmin.bat ping-connect
        ion-pool DerbyPool
           [testng] RtExec.execute: e:\glassfish3\glassfish\bin\asadmin.bat ping-connect
        ion-pool QLJdbcPool
           [testng] RtExec.execute: e:\glassfish3\glassfish\bin\asadmin.bat delete-jdbc-
        connection-pool QLJdbcPool
           [testng] PASSED: createJDBCPool
           [testng] PASSED: pingJDBCPool
           [testng] PASSED: deleteJDBCPool
           [testng] FAILED: restartDomainTest
           [testng] java.lang.AssertionError: Restart domain failed. expected:<true> but
         was:<false>
           [testng]     at test.admincli.RestartDomainTests.parseTestResults(RestartDoma
        inTests.java:90)
           [testng]     at test.admincli.RestartDomainTests.restartDomainTest(RestartDom
        ainTests.java:62)
           [testng] ... Removed 26 stack frames
           [testng]
           [testng] ===============================================
           [testng]     admincli_tests
           [testng]     Tests run: 4, Failures: 1, Skips: 0
        

        After run all of the quicklook tests, The tests-ng summary as follow:

        testng-summary:
             [echo]    [testng]
             [echo]    [testng] ===============================================
             [echo]    [testng] QuickLookTests
             [echo]    [testng] Total tests run: 115, Failures: 1, Skips: 0
             [echo]    [testng] ===============================================
             [echo]    [testng]
        

        BTW: I will try to reproduce it on the env of LINUX to see whether the tests failed only in Windows env.

        Show
        Jeremy_Lv added a comment - Tom >Is this test failure reliably repeatable or does it only happen occasionally? >Also, even though the stop-domain command fails, is the DAS actually stopped? The issue can be re-produced 100%. And not only in my env, in jeremy's env, the issue has been also re-produced. Tang yes, it can be reproduced in my env, The detailed information are as follows: [testng] [Parser] Running: [testng] E:\GF_MAIN\SOURCE_0108\appserver\tests\quicklook\testng\testng_gd. xml [testng] [testng] RtExec.execute: e:\glassfish3\glassfish\bin\asadmin.bat create-jdbc- connection-pool --datasourceclassname=org.apache.derby.jdbc.ClientDataSource --p roperty DatabaseName=sun-appserv-samples:PortNumber=1527:serverName=localhost:Pa ssword=APP:User=APP QLJdbcPool [testng] RtExec.execute: e:\glassfish3\glassfish\bin\asadmin.bat ping-connect ion-pool DerbyPool [testng] RtExec.execute: e:\glassfish3\glassfish\bin\asadmin.bat ping-connect ion-pool QLJdbcPool [testng] RtExec.execute: e:\glassfish3\glassfish\bin\asadmin.bat delete-jdbc- connection-pool QLJdbcPool [testng] PASSED: createJDBCPool [testng] PASSED: pingJDBCPool [testng] PASSED: deleteJDBCPool [testng] FAILED: restartDomainTest [testng] java.lang.AssertionError: Restart domain failed. expected:< true > but was:< false > [testng] at test.admincli.RestartDomainTests.parseTestResults(RestartDoma inTests.java:90) [testng] at test.admincli.RestartDomainTests.restartDomainTest(RestartDom ainTests.java:62) [testng] ... Removed 26 stack frames [testng] [testng] =============================================== [testng] admincli_tests [testng] Tests run: 4, Failures: 1, Skips: 0 After run all of the quicklook tests, The tests-ng summary as follow: testng-summary: [echo] [testng] [echo] [testng] =============================================== [echo] [testng] QuickLookTests [echo] [testng] Total tests run: 115, Failures: 1, Skips: 0 [echo] [testng] =============================================== [echo] [testng] BTW: I will try to reproduce it on the env of LINUX to see whether the tests failed only in Windows env.
        Hide
        Tom Mueller added a comment -

        I suspect that the reason this test is failing on Windows is because of the following:

        1. On Windows, the QL test doesn't actually run restart-domain - it does stop-domain followed by start-domain. See issue GLASSFISH-16442. After 16442 was fixed, the QL test was never changed back to using restart-domain.

        2. In the Windows workaround for #1, the message that is output is "Successfully restarted the domain". However, the RestartDomainTests test checks for the message "Command restart-domain executed successfully." Since these messages do not match, the test fails.

        So the solution for this bug should be to change the QL test back to using restart-domain on Windows.

        Show
        Tom Mueller added a comment - I suspect that the reason this test is failing on Windows is because of the following: 1. On Windows, the QL test doesn't actually run restart-domain - it does stop-domain followed by start-domain. See issue GLASSFISH-16442 . After 16442 was fixed, the QL test was never changed back to using restart-domain. 2. In the Windows workaround for #1, the message that is output is "Successfully restarted the domain". However, the RestartDomainTests test checks for the message "Command restart-domain executed successfully." Since these messages do not match, the test fails. So the solution for this bug should be to change the QL test back to using restart-domain on Windows.
        Hide
        Tom Mueller added a comment -

        Fixed in revision 59330.
        Changed the Quicklook test so that it uses restart-domain on Windows rather than stop-domain followed by start-domain.

        Show
        Tom Mueller added a comment - Fixed in revision 59330. Changed the Quicklook test so that it uses restart-domain on Windows rather than stop-domain followed by start-domain.

          People

          • Assignee:
            Tom Mueller
            Reporter:
            TangYong
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: