changeset 14443:ee022b8f5e2d

8155049: New tests from 8144566 fail with "No expected Server Name Indication" Reviewed-by: xuelei
author rhalade
date Mon, 16 May 2016 10:36:51 -0700
parents 0c2e739fb309
children ced2868c2e8d
files test/javax/net/ssl/ServerName/BestEffortOnLazyConnected.java test/sun/net/www/protocol/https/HttpsURLConnection/ImpactOnSNI.java
diffstat 2 files changed, 2 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/test/javax/net/ssl/ServerName/BestEffortOnLazyConnected.java	Mon May 16 16:04:14 2016 +0100
+++ b/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/test/sun/net/www/protocol/https/HttpsURLConnection/ImpactOnSNI.java	Mon May 16 16:04:14 2016 +0100
+++ b/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))) {