diff options
author | philwo <philwo@google.com> | 2017-06-06 05:12:51 -0400 |
---|---|---|
committer | John Cater <jcater@google.com> | 2017-06-06 09:50:54 -0400 |
commit | a2194e580c4c6a0325a0531d8ef170f78dd6f415 (patch) | |
tree | 443e56310dfa67521a56c9f61f4840b4dd1a4ca3 /examples/java-native/src/test/java/com/example/myproject/TestSleep.java | |
parent | 7e7d94efbfecfea43ab32d62bf6770875947b77e (diff) |
Add an example that shows how to use the cpu:<num> tag for tests.
Also serves as an example for bug #3106.
PiperOrigin-RevId: 158116940
Diffstat (limited to 'examples/java-native/src/test/java/com/example/myproject/TestSleep.java')
-rw-r--r-- | examples/java-native/src/test/java/com/example/myproject/TestSleep.java | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/examples/java-native/src/test/java/com/example/myproject/TestSleep.java b/examples/java-native/src/test/java/com/example/myproject/TestSleep.java new file mode 100644 index 0000000000..21e2271bd1 --- /dev/null +++ b/examples/java-native/src/test/java/com/example/myproject/TestSleep.java @@ -0,0 +1,12 @@ +package com.example.myproject; + +import org.junit.Test; + +/** Contains a single test that just sleeps for 15 seconds and then succeeds. */ +public class TestSleep { + @Test + public void testSleep() throws Exception { + // Sleep for 15 seconds. + Thread.sleep(15 * 1000); + } +} |