Skip to content

Commit e7de3af

Browse files
committed
fix error when test in openjdk7
travis-ci/travis-ci#5227 (comment)
1 parent 1a17cc8 commit e7de3af

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

.travis.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,12 @@ env:
1010
- JDK=oraclejdk7
1111
- JDK=openjdk7
1212
before_script:
13-
- jdk_switcher use $JDK
13+
- jdk_switcher use $JDK
14+
#https://github.com/travis-ci/travis-ci/issues/5227#issuecomment-165131913
15+
- cat /etc/hosts # optionally check the content *before*
16+
- sudo hostname "$(hostname | cut -c1-63)"
17+
- sed -e "s/^\\(127\\.0\\.0\\.1.*\\)/\\1 $(hostname | cut -c1-63)/" /etc/hosts | sudo tee /etc/hosts
18+
- cat /etc/hosts # optionally check the content *after*
1419
matrix:
1520
# scala 2.12 require java 8
1621
exclude:

0 commit comments

Comments
 (0)