Doroszlai, Attila created AMBARI-24948:
------------------------------------------

             Summary: Test ordering issue in ExecutionCommandWrapperTest
                 Key: AMBARI-24948
                 URL: https://issues.apache.org/jira/browse/AMBARI-24948
             Project: Ambari
          Issue Type: Bug
          Components: ambari-server
            Reporter: Doroszlai, Attila
            Assignee: Doroszlai, Attila
             Fix For: 2.8.0


Success/failure of test cases in ExecutionCommandWrapperTest depends on the 
execution order.  The two interdependent tests are 
{{testExecutionCommandNoRepositoryFile}} and {{testGetExecutionCommand}}, 
executing the former first makes the latter fail.

{noformat:title=order 1}
  @Test
  public void testExecutionCommandNoRepositoryFile_first() throws Exception {
    testExecutionCommandNoRepositoryFile();
    testGetExecutionCommand();
  }
{noformat}

{noformat:title=result 1}
[INFO] Running 
org.apache.ambari.server.actionmanager.ExecutionCommandWrapperTest
[ERROR] Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 11.002 
s <<< FAILURE! - in 
org.apache.ambari.server.actionmanager.ExecutionCommandWrapperTest
[ERROR] 
testExecutionCommandNoRepositoryFile_first(org.apache.ambari.server.actionmanager.ExecutionCommandWrapperTest)
  Time elapsed: 0.031 s  <<< FAILURE!
java.lang.AssertionError
        at 
org.apache.ambari.server.actionmanager.ExecutionCommandWrapperTest.testGetExecutionCommand(ExecutionCommandWrapperTest.java:202)
        at 
org.apache.ambari.server.actionmanager.ExecutionCommandWrapperTest.testExecutionCommandNoRepositoryFile_first(ExecutionCommandWrapperTest.java:320)
{noformat}

{noformat:title=order 2}
  @Test
  public void testGetExecutionCommand_first() throws Exception {
    testGetExecutionCommand();
    testExecutionCommandNoRepositoryFile();
  }
{noformat}

{noformat:title=result 2}
[INFO] Running 
org.apache.ambari.server.actionmanager.ExecutionCommandWrapperTest
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 11.304 s 
- in org.apache.ambari.server.actionmanager.ExecutionCommandWrapperTest
{noformat}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to