Author: pascalschumacher
Date: Fri Aug 11 16:58:51 2017
New Revision: 1804823

URL: http://svn.apache.org/viewvc?rev=1804823&view=rev
Log:
Exec65Test#testExec65WithSudoUsingShellScript: skip this test on travis, 
because we have to be a sudoer on travis to make the other tests pass.

Modified:
    
commons/proper/exec/trunk/src/test/java/org/apache/commons/exec/issues/Exec65Test.java

Modified: 
commons/proper/exec/trunk/src/test/java/org/apache/commons/exec/issues/Exec65Test.java
URL: 
http://svn.apache.org/viewvc/commons/proper/exec/trunk/src/test/java/org/apache/commons/exec/issues/Exec65Test.java?rev=1804823&r1=1804822&r2=1804823&view=diff
==============================================================================
--- 
commons/proper/exec/trunk/src/test/java/org/apache/commons/exec/issues/Exec65Test.java
 (original)
+++ 
commons/proper/exec/trunk/src/test/java/org/apache/commons/exec/issues/Exec65Test.java
 Fri Aug 11 16:58:51 2017
@@ -24,10 +24,13 @@ import org.apache.commons.exec.ExecuteEx
 import org.apache.commons.exec.ExecuteWatchdog;
 import org.apache.commons.exec.OS;
 import org.apache.commons.exec.PumpStreamHandler;
+import org.junit.Assume;
 import org.junit.Test;
 
 import static org.junit.Assert.assertTrue;
 
+import java.io.File;
+
 /**
  * Test to show that watchdog can destroy 'sudo' and 'sleep'.
  *
@@ -101,7 +104,8 @@ public class Exec65Test extends Abstract
      */
     @Test(expected = ExecuteException.class, timeout = TEST_TIMEOUT)
     public void testExec65WithSudoUsingShellScript() throws Exception {
-
+        Assume.assumeFalse("Test is skipped on travis, because we have to be a 
sudoer "
+                + "to make the other tests pass.", new 
File(".").getAbsolutePath().contains("travis"));
         if (OS.isFamilyUnix()) {
             final DefaultExecutor executor = new DefaultExecutor();
             executor.setStreamHandler(new PumpStreamHandler(System.out, 
System.err, System.in));


Reply via email to