< prev index next >

test/jdk/java/nio/channels/vthread/SelectorOps.java

Print this page

 11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
 12  * version 2 for more details (a copy is included in the LICENSE file that
 13  * accompanied this code).
 14  *
 15  * You should have received a copy of the GNU General Public License version
 16  * 2 along with this work; if not, write to the Free Software Foundation,
 17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
 18  *
 19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
 20  * or visit www.oracle.com if you need additional information or have any
 21  * questions.
 22  */
 23 
 24 /*
 25  * @test id=default
 26  * @summary Test virtual threads doing selection operations
 27  * @library /test/lib
 28  * @run junit/othervm --enable-native-access=ALL-UNNAMED SelectorOps
 29  */
 30 








 31 /*
 32  * @test id=no-vmcontinuations
 33  * @requires vm.continuations
 34  * @library /test/lib
 35  * @run junit/othervm -XX:+UnlockExperimentalVMOptions -XX:-VMContinuations
 36  *     --enable-native-access=ALL-UNNAMED SelectorOps
 37  */
 38 
 39 import java.io.IOException;
 40 import java.nio.ByteBuffer;
 41 import java.nio.channels.Pipe;
 42 import java.nio.channels.SelectionKey;
 43 import java.nio.channels.Selector;
 44 import java.nio.charset.StandardCharsets;
 45 import java.util.Arrays;
 46 import java.util.concurrent.TimeUnit;
 47 
 48 import jdk.test.lib.thread.VThreadRunner;
 49 import jdk.test.lib.thread.VThreadPinner;
 50 import org.junit.jupiter.api.Test;

 11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
 12  * version 2 for more details (a copy is included in the LICENSE file that
 13  * accompanied this code).
 14  *
 15  * You should have received a copy of the GNU General Public License version
 16  * 2 along with this work; if not, write to the Free Software Foundation,
 17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
 18  *
 19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
 20  * or visit www.oracle.com if you need additional information or have any
 21  * questions.
 22  */
 23 
 24 /*
 25  * @test id=default
 26  * @summary Test virtual threads doing selection operations
 27  * @library /test/lib
 28  * @run junit/othervm --enable-native-access=ALL-UNNAMED SelectorOps
 29  */
 30 
 31 /*
 32  * @test id=poller-modes
 33  * @requires (os.family == "linux") | (os.family == "mac")
 34  * @library /test/lib
 35  * @run junit/othervm -Djdk.pollerMode=1 --enable-native-access=ALL-UNNAMED SelectorOps
 36  * @run junit/othervm -Djdk.pollerMode=2 --enable-native-access=ALL-UNNAMED SelectorOps
 37  */
 38 
 39 /*
 40  * @test id=no-vmcontinuations
 41  * @requires vm.continuations
 42  * @library /test/lib
 43  * @run junit/othervm -XX:+UnlockExperimentalVMOptions -XX:-VMContinuations
 44  *     --enable-native-access=ALL-UNNAMED SelectorOps
 45  */
 46 
 47 import java.io.IOException;
 48 import java.nio.ByteBuffer;
 49 import java.nio.channels.Pipe;
 50 import java.nio.channels.SelectionKey;
 51 import java.nio.channels.Selector;
 52 import java.nio.charset.StandardCharsets;
 53 import java.util.Arrays;
 54 import java.util.concurrent.TimeUnit;
 55 
 56 import jdk.test.lib.thread.VThreadRunner;
 57 import jdk.test.lib.thread.VThreadPinner;
 58 import org.junit.jupiter.api.Test;
< prev index next >