Skip to content

Commit 33c3999

Browse files
authored
Update Travis OSX build to use newest image (#608)
Java 8 is already installed in the newest image. travis-ci/docs-travis-ci-com#593 travis-ci/travis-ci#2316
1 parent c9438f1 commit 33c3999

File tree

3 files changed

+17
-9
lines changed

3 files changed

+17
-9
lines changed

.travis-scripts/install.sh

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,7 @@
11
#!/bin/bash
22

3-
if [[ $TRAVIS_OS_NAME == 'osx' ]]; then
4-
5-
# Install some custom requirements on OS X
6-
wget --no-cookies --no-check-certificate --header "Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com%2F; oraclelicense=accept-securebackup-cookie" http://download.oracle.com/otn-pub/java/jdk/8u92-b14/jdk-8u92-macosx-x64.dmg
7-
hdiutil mount jdk-8u92-macosx-x64.dmg
8-
sudo installer -pkg /Volumes/JDK\ 8\ Update\ 92/JDK\ 8\ Update\ 92.pkg -target LocalSystem
9-
else
3+
if [[ $TRAVIS_OS_NAME != 'osx' ]]; then
4+
# Install some custom requirements on Linux if necessary
105
export DISPLAY=:99.0
116
sh -e /etc/init.d/xvfb start
127
pip install --user codecov

.travis.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ matrix:
77
- os: linux
88
jdk: oraclejdk8
99
- os: osx
10+
osx_image: xcode8
1011

1112
# GCC needs to be 4.8 or higher so that GOMP_4.0 is installed for opencv
1213
# This is incredibly hard to track down, find the solution for and fix.

core/src/test/java/edu/wpi/grip/core/util/service/AutoRestartingServiceTest.java

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,27 @@
33
import com.google.common.util.concurrent.AbstractExecutionThreadService;
44
import com.google.common.util.concurrent.MoreExecutors;
55
import com.google.common.util.concurrent.Service;
6+
67
import org.junit.After;
78
import org.junit.Before;
9+
import org.junit.Rule;
810
import org.junit.Test;
11+
import org.junit.rules.Timeout;
912

1013
import java.util.LinkedList;
1114
import java.util.concurrent.CountDownLatch;
1215
import java.util.concurrent.Executor;
16+
import java.util.concurrent.TimeUnit;
1317
import java.util.function.Consumer;
1418
import java.util.function.Supplier;
1519

1620
import static com.google.common.truth.Truth.assertThat;
17-
import static org.junit.Assert.*;
21+
import static org.junit.Assert.assertEquals;
22+
import static org.junit.Assert.assertFalse;
23+
import static org.junit.Assert.assertNotEquals;
24+
import static org.junit.Assert.assertNull;
25+
import static org.junit.Assert.assertTrue;
26+
import static org.junit.Assert.fail;
1827

1928
/**
2029
* Many of these mock service objects are copied from Guava's test framework.
@@ -28,6 +37,9 @@ public class AutoRestartingServiceTest {
2837
private Throwable thrownByExecutionThread;
2938
private Executor exceptionCatchingExecutor;
3039

40+
@Rule
41+
public Timeout timeout = new Timeout(10, TimeUnit.SECONDS);
42+
3143
@Before
3244
public void setUp() {
3345
// Make sure that this is always reset
@@ -276,4 +288,4 @@ protected Executor executor() {
276288
return exceptionCatchingExecutor;
277289
}
278290
}
279-
}
291+
}

0 commit comments

Comments
 (0)