8155049: New tests from 8144566 fail with "No expected Server Name Indication"
Reviewed-by: xuelei
--- a/jdk/test/javax/net/ssl/ServerName/BestEffortOnLazyConnected.java Mon May 16 16:04:14 2016 +0100
+++ b/jdk/test/javax/net/ssl/ServerName/BestEffortOnLazyConnected.java Mon May 16 10:36:51 2016 -0700
@@ -34,9 +34,6 @@
*/
import java.io.*;
-import java.nio.*;
-import java.nio.channels.*;
-import java.util.*;
import java.net.*;
import javax.net.ssl.*;
@@ -197,6 +194,7 @@
hostname);
// Ignore the test if the hostname does not sound like a domain name.
if ((hostname == null) || hostname.isEmpty() ||
+ !hostname.contains(".") || hostname.endsWith(".") ||
hostname.startsWith("localhost") ||
Character.isDigit(hostname.charAt(hostname.length() - 1))) {
--- a/jdk/test/sun/net/www/protocol/https/HttpsURLConnection/ImpactOnSNI.java Mon May 16 16:04:14 2016 +0100
+++ b/jdk/test/sun/net/www/protocol/https/HttpsURLConnection/ImpactOnSNI.java Mon May 16 10:36:51 2016 -0700
@@ -235,6 +235,7 @@
hostname);
// Ignore the test if the hostname does not sound like a domain name.
if ((hostname == null) || hostname.isEmpty() ||
+ !hostname.contains(".") || hostname.endsWith(".") ||
hostname.startsWith("localhost") ||
Character.isDigit(hostname.charAt(hostname.length() - 1))) {