Przeglądaj źródła

AMBARI-19799. Optimize DB initialization for Ambari Server Unit Tests. Additional fixes. (mpapirkovskyy)

Myroslav Papirkovskyi 8 lat temu
rodzic
commit
98baf6c049

+ 3 - 0
ambari-server/pom.xml

@@ -317,6 +317,9 @@
 
             <!--Velocity log -->
             <exclude>**/velocity.log*</exclude>
+
+            <!-- generated DDL-->
+            <exclude>**/createDDL.jdbc</exclude>
           </excludes>
         </configuration>
         <executions>

+ 3 - 3
ambari-server/src/test/java/org/apache/ambari/server/topology/AsyncCallableServiceTest.java

@@ -75,8 +75,8 @@ public class AsyncCallableServiceTest extends EasyMockSupport {
   public void testCallableServiceShouldCancelTaskWhenTimeoutExceeded() throws Exception {
     // GIVEN
 
-    //the timeout period should be small!!!
-    timeout = 1l;
+    //the timeout period should be less zero for guaranteed timeout!
+    timeout = -1l;
 
     // the task to be executed never completes successfully
     expect(futureMock.get(timeout, TimeUnit.MILLISECONDS)).andThrow(new TimeoutException("Testing the timeout exceeded case"));
@@ -180,4 +180,4 @@ public class AsyncCallableServiceTest extends EasyMockSupport {
     verify();
     Assert.assertNull("Service result must be null", serviceResult);
   }
-}
+}