# HG changeset patch # User Jaroslav Tulach # Date 1442306164 -7200 # Node ID 50056a161d7f4c9374ab472c93d16059de952aa4 # Parent 48004d27086da329704e22df477f44e9fd5febc5 Replacing time out associated warnings by UnsupportedOperationException. Meaning of exception is probably more straightforward than a soft hint attempted before. Shouldn't influence the way things are build, if tests are skipped. diff -r 48004d27086d -r 50056a161d7f truffle/com.oracle.truffle.tck/src/com/oracle/truffle/tck/TruffleTCK.java --- a/truffle/com.oracle.truffle.tck/src/com/oracle/truffle/tck/TruffleTCK.java Tue Sep 15 09:30:22 2015 +0200 +++ b/truffle/com.oracle.truffle.tck/src/com/oracle/truffle/tck/TruffleTCK.java Tue Sep 15 10:36:04 2015 +0200 @@ -30,8 +30,6 @@ import com.oracle.truffle.api.vm.TruffleVM; import java.io.IOException; import java.util.Random; -import java.util.logging.Level; -import java.util.logging.Logger; import static org.junit.Assert.*; import org.junit.Test; @@ -41,7 +39,6 @@ * include in your test suite. */ public abstract class TruffleTCK { - private static final Logger LOG = Logger.getLogger(TruffleTCK.class.getName()); private static final Random RANDOM = new Random(); private TruffleVM tckVM; @@ -134,18 +131,7 @@ * @return name of globally exported symbol */ protected String identity() { - final long introduced = 1441894042844L; - long wait = (System.currentTimeMillis() - introduced) / 36000; - if (wait < 100) { - wait = 100; - } - LOG.log(Level.SEVERE, "identity() method not overriden. Waiting for {0} ms", wait); - try { - Thread.sleep(wait); - } catch (InterruptedException ex) { - LOG.log(Level.SEVERE, null, ex); - } - return null; + throw new UnsupportedOperationException("identity() method not implemented"); } /** @@ -192,7 +178,7 @@ * @return name of a function that returns such compound object */ protected String compoundObject() { - return null; + throw new UnsupportedOperationException("compoundObject() method not implemented"); } private TruffleVM vm() throws Exception { @@ -221,7 +207,7 @@ @Test public void testFortyTwoWithCompoundObject() throws Exception { - CompoundObject obj = findCompoundSymbol("testFortyTwoWithCompoundObject"); + CompoundObject obj = findCompoundSymbol(); if (obj == null) { return; } @@ -240,7 +226,7 @@ @Test public void testNullInCompoundObject() throws Exception { - CompoundObject obj = findCompoundSymbol("testNullInCompoundObject"); + CompoundObject obj = findCompoundSymbol(); if (obj == null) { return; } @@ -319,7 +305,7 @@ int a = RANDOM.nextInt(100); int b = RANDOM.nextInt(100); - CompoundObject obj = findCompoundSymbol("testPlusWithIntsOnCompoundObject"); + CompoundObject obj = findCompoundSymbol(); if (obj == null) { return; } @@ -569,18 +555,8 @@ return s; } - private CompoundObject findCompoundSymbol(String name) throws Exception { + private CompoundObject findCompoundSymbol() throws Exception { final String compoundObjectName = compoundObject(); - if (compoundObjectName == null) { - final long introduced = 1441616302340L; - long wait = (System.currentTimeMillis() - introduced) / 36000; - if (wait < 100) { - wait = 100; - } - LOG.log(Level.SEVERE, "compoundObject() method not overriden! Skipping {1} test for now. But sleeping for {0} ms.", new Object[]{wait, name}); - Thread.sleep(wait); - return null; - } TruffleVM.Symbol s = vm().findGlobalSymbol(compoundObjectName); assert s != null : "Symbol " + compoundObjectName + " is not found!"; final TruffleVM.Symbol value = s.invoke(null);