--- old/test/java/nio/channels/AsynchronousServerSocketChannel/Basic.java 2016-02-24 13:34:31.360280958 +0530 +++ new/test/java/nio/channels/AsynchronousServerSocketChannel/Basic.java 2016-02-24 13:34:31.232280956 +0530 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2008, 2016, 2011, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -141,11 +141,13 @@ try { // check supported options Set> options = ch.supportedOptions(); + boolean quickAck = options.contains(jdk.net.ExtendedSocketOptions.SO_QUICKACK); if (!options.contains(SO_REUSEADDR)) throw new RuntimeException("SO_REUSEADDR should be supported"); if (!options.contains(SO_RCVBUF)) throw new RuntimeException("SO_RCVBUF should be supported"); - + if (!options.contains(jdk.net.ExtendedSocketOptions.SO_QUICKACK) && quickAck) + throw new RuntimeException("SO_QUICKACK should be supported"); // allowed to change when not bound ch.setOption(SO_RCVBUF, 256*1024); // can't check int before = ch.getOption(SO_RCVBUF); @@ -156,6 +158,12 @@ checkOption(ch, SO_REUSEADDR, true); ch.setOption(SO_REUSEADDR, false); checkOption(ch, SO_REUSEADDR, false); + if (quickAck) { + ch.setOption(jdk.net.ExtendedSocketOptions.SO_QUICKACK, true); + checkOption(ch, jdk.net.ExtendedSocketOptions.SO_QUICKACK, true); + ch.setOption(jdk.net.ExtendedSocketOptions.SO_QUICKACK, false); + checkOption(ch, jdk.net.ExtendedSocketOptions.SO_QUICKACK, false); + } } finally { ch.close(); }