Skip to content

Commit

Permalink
Resolve #211, #230: Java8switch
Browse files Browse the repository at this point in the history
Merge branch 'hbz-java8switch'

Cherry-picked commits from pull request:
 - Make metafcature-core build on Java 8: switch to antlr3.5.2
 - Make travis use the right Java version
 - make the GC wait a little longer in UnitTest for travis...
  • Loading branch information
cboehme committed Jun 17, 2015
2 parents 6759c63 + 44bff6a commit 7f9864c
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
language: java
jdk:
- openjdk6
- oraclejdk8

env:
global:
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<targetJdk>1.6</targetJdk>
<antlr.version>3.5.1</antlr.version>
<antlr.version>3.5.2</antlr.version>
</properties>

<scm>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,11 @@ public void shouldNotFailIfFlushingBeforeFirstRecord() {
* This test case may throw fail unexpectedly as it relies on the
* garbage collector to run when calling {@code System.gc()}. This
* is not guaranteed by the JVM.
*
* @throws InterruptedException
*/
@Test
public void issue192ShouldUnregisterFromTheJVMToNotCauseMemoryLeak() {
public void issue192ShouldUnregisterFromTheJVMToNotCauseMemoryLeak() throws InterruptedException {

// Get weak reference for checking whether the object was actually freed later:
final ReferenceQueue<AbstractTripleSort> refQueue = new ReferenceQueue<AbstractTripleSort>();
Expand All @@ -71,6 +73,9 @@ public void issue192ShouldUnregisterFromTheJVMToNotCauseMemoryLeak() {

System.gc();

// Wait a tiny bit since GC Thread is not immediately done in Java 8
Thread.sleep(10);

assertTrue(weakRef.isEnqueued());
}

Expand Down

0 comments on commit 7f9864c

Please sign in to comment.