On Tue, 12 May 2026 20:28:54 GMT, Ashay Rane <[email protected]> wrote:

> NTLM is removed from Windows 11 24H2 and Windows Server 2025 [1],
> causing the NTLMHeadTest and TestTransparentNTLM tests to fail on these
> platforms.  This patch adds an annotation to skip these tests on Windows
> 11 and on Windows Server 2025.
> 
> [1] 
> https://support.microsoft.com/en-us/topic/upcoming-changes-to-ntlmv1-in-windows-11-version-24h2-and-windows-server-2025-c0554217-cdbc-420f-b47c-e02b2db49b2e
> 
> ---------
> - [x] I confirm that I make this contribution in accordance with the [OpenJDK 
> Interim AI Policy](https://openjdk.org/legal/ai).

Hello Ashay,

> (for example should it also take into account any future Windows versions and 
> mark it disabled on those versions too)

An alternate way of skipping this test for Windows 11, Windows Server 2025 and 
any future versions of Windows would be something like this:


diff --git a/test/jdk/sun/net/www/protocol/http/NTLMHeadTest.java 
b/test/jdk/sun/net/www/protocol/http/NTLMHeadTest.java
index 52174ab2f55..2cbbf5f6534 100644
--- a/test/jdk/sun/net/www/protocol/http/NTLMHeadTest.java
+++ b/test/jdk/sun/net/www/protocol/http/NTLMHeadTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2021, 2022, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2021, 2026, 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
@@ -22,8 +22,9 @@
  */
 
 /*
- * @test
+ * @test id=default
  * @bug 8270290
+ * @requires os.family != "windows"
  * @library /test/lib
  * @run main/othervm NTLMHeadTest SERVER
  * @run main/othervm NTLMHeadTest PROXY
@@ -48,6 +49,17 @@
  *      include the body.
  */
 
+/*
+ * @test id=windows
+ * @bug 8270290
+ * @comment Only run on specific Windows OS versions because NTLMv1 is no 
longer supported starting Windows 11 and Windows Server 2025
+ * @requires os.family == "windows" & (os.name == "Windows 10" | os.name == 
"Windows Server 2016" | os.name == "Windows Server 2019" | os.name == "Windows 
Server 2022")
+ * @library /test/lib
+ * @run main/othervm NTLMHeadTest SERVER
+ * @run main/othervm NTLMHeadTest PROXY
+ * @run main/othervm NTLMHeadTest TUNNEL
+ */
+
 import java.net.*;
 import java.io.*;
 import java.util.*;
diff --git a/test/jdk/sun/net/www/protocol/http/TestTransparentNTLM.java 
b/test/jdk/sun/net/www/protocol/http/TestTransparentNTLM.java
index 1c2262ba8e2..7a8082a4012 100644
--- a/test/jdk/sun/net/www/protocol/http/TestTransparentNTLM.java
+++ b/test/jdk/sun/net/www/protocol/http/TestTransparentNTLM.java
@@ -26,7 +26,8 @@
  * @bug 8225425
  * @summary Verifies that transparent NTLM (on Windows) is not used by default,
  *          and is used only when the relevant property is set.
- * @requires os.family == "windows"
+ * @comment Only run on specific Windows OS versions because NTLMv1 is no 
longer supported starting Windows 11 and Windows Server 2025
+ * @requires os.family == "windows" & (os.name == "Windows 10" | os.name == 
"Windows Server 2016" | os.name == "Windows Server 2019" | os.name == "Windows 
Server 2022")
  * @library /test/lib
  * @run junit/othervm
  *      -Dtest.auth.succeed=false


I have tried this in our CI and it works fine; the tests are skipped on Windows 
11 and Windows Server 2025, but continue to run on other platforms and other 
versions of Windows. Is this something that you could try on your setups and if 
it works maybe use this in this PR?

-------------

PR Comment: https://git.openjdk.org/jdk/pull/31141#issuecomment-4497022575

Reply via email to