8155049: New tests from 8144566 fail with "No expected Server Name Indication"
authorrhalade
Mon, 16 May 2016 10:36:51 -0700
changeset 38323 9653a8faa2b9
parent 38322 f6f9d3ec14ba
child 38325 ff2c8e648ca5
8155049: New tests from 8144566 fail with "No expected Server Name Indication" Reviewed-by: xuelei
jdk/test/javax/net/ssl/ServerName/BestEffortOnLazyConnected.java
jdk/test/sun/net/www/protocol/https/HttpsURLConnection/ImpactOnSNI.java
--- 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))) {