Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

java/time/test/java/time/format/TestUTCParse fails on macstadium machines (expects UTC not PST) #3361

Open
smlambert opened this issue Jan 29, 2024 · 9 comments
Assignees
Labels

Comments

@smlambert
Copy link
Contributor

As mentioned in adoptium/aqa-tests#4982 (comment) and adoptium/aqa-tests#4982 (comment), java/time/test/java/time/format/TestUTCParse fails with the following error:

11:29:41  test test.java.time.format.TestUTCParse.testUTCShortNameRoundTrip(): failure
11:29:41  java.lang.AssertionError: expected [UTC−08:00] but found [PST]
11:29:41  	at org.testng.Assert.fail(Assert.java:99)
11:29:41  	at org.testng.Assert.failNotEquals(Assert.java:1037)
11:29:41  	at org.testng.Assert.assertEqualsImpl(Assert.java:140)
11:29:41  	at org.testng.Assert.assertEquals(Assert.java:122)
11:29:41  	at org.testng.Assert.assertEquals(Assert.java:629)
11:29:41  	at org.testng.Assert.assertEquals(Assert.java:639)
11:29:41  	at test.java.time.format.TestUTCParse.testUTCShortNameRoundTrip(TestUTCParse.java:65)
11:29:41  	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
11:29:41  	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
11:29:41  	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
11:29:41  	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
11:29:41  	at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:132)
11:29:41  	at org.testng.internal.TestInvoker.invokeMethod(TestInvoker.java:599)
11:29:41  	at org.testng.internal.TestInvoker.invokeTestMethod(TestInvoker.java:174)
11:29:41  	at org.testng.internal.MethodRunner.runInSequence(MethodRunner.java:46)
11:29:41  	at org.testng.internal.TestInvoker$MethodInvocationAgent.invoke(TestInvoker.java:822)
11:29:41  	at org.testng.internal.TestInvoker.invokeTestMethods(TestInvoker.java:147)
11:29:41  	at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:146)
11:29:41  	at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:128)
11:29:41  	at java.base/java.util.ArrayList.forEach(ArrayList.java:1541)
11:29:41  	at org.testng.TestRunner.privateRun(TestRunner.java:764)
11:29:41  	at org.testng.TestRunner.run(TestRunner.java:585)
11:29:41  	at org.testng.SuiteRunner.runTest(SuiteRunner.java:384)
11:29:41  	at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:378)
11:29:41  	at org.testng.SuiteRunner.privateRun(SuiteRunner.java:337)
11:29:41  	at org.testng.SuiteRunner.run(SuiteRunner.java:286)
11:29:41  	at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:53)
11:29:41  	at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:96)
11:29:41  	at org.testng.TestNG.runSuitesSequentially(TestNG.java:1218)
11:29:41  	at org.testng.TestNG.runSuitesLocally(TestNG.java:1140)
11:29:41  	at org.testng.TestNG.runSuites(TestNG.java:1069)
11:29:41  	at org.testng.TestNG.run(TestNG.java:1037)
11:29:41  	at com.sun.javatest.regtest.agent.TestNGRunner.main(TestNGRunner.java:94)
11:29:41  	at com.sun.javatest.regtest.agent.TestNGRunner.main(TestNGRunner.java:54)
11:29:41  	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
11:29:41  	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
11:29:41  	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
11:29:41  	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
11:29:41  	at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:127)
11:29:41  	at java.base/java.lang.Thread.run(Thread.java:829)
11:29:41  
11:29:41  ===============================================
11:29:41  java/time/test/java/time/format/TestUTCParse.java
11:29:41  Total tests run: 4, Passes: 3, Failures: 1, Skips: 0

To make it easy for the infrastructure team to repeat and diagnose, please
answer the following questions:

Any other details:
see console output above

@sxa
Copy link
Member

sxa commented Jan 30, 2024

Related: Top level issue at #2662, and the orka issue at #2536

@sxa
Copy link
Member

sxa commented Nov 5, 2024

Need to verify if this fails on the orka machines, and then decide what to do if it still fails on any of our existing statically provisiioned systems (e.g. macincloud)

@sxa
Copy link
Member

sxa commented Nov 18, 2024

Attempting re-run on the orka nodes at https://ci.adoptium.net/job/Grinder/11427/ but it fell foul of #3814

@sxa
Copy link
Member

sxa commented Nov 18, 2024

Also testing on x64 at:

@sxa sxa self-assigned this Nov 18, 2024
@sxa sxa moved this from Todo to In Progress in 2024 4Q Adoptium Plan Nov 18, 2024
@sxa
Copy link
Member

sxa commented Nov 19, 2024

Honestly wondering if this is something specific to macos 10 at the moment. This reproducer shows that it is giving a "local" timezone (i.e. PST if using the code below, or GMT if you use Europe/London) instead of a UTC offset:

import java.time.*;
import java.time.format.*;
import java.util.Locale;

public class utc
{
    public static void main(String [] args) 
    {
        var fmt = DateTimeFormatter.ofPattern("z", Locale.FRANCE);
        var zdt = ZonedDateTime.of(2023, 3, 3, 0, 0, 0, 0, ZoneId.of("America/Los_Angeles"));
        System.out.println("Expecting UTC\u221208:00, got "+fmt.format(zdt));
    }
}

@sxa
Copy link
Member

sxa commented Nov 19, 2024

Noting that this is the same failure which has been seen in #3658 (comment) and the test has been excluded for Temurin runs. The notes in there also indicate that it's a test which has been removed from newer JDKs.

(Noting for historic reference that this test is NOT impacted by the TZ setting in the environment)

@sxa
Copy link
Member

sxa commented Nov 19, 2024

@Haroon-Khel Is there a reason why the PR to exclude this was done on linux-all and not macos too since it was seen there too in your issue?

@sxa sxa moved this from In Progress to Paused/Blocked in 2024 4Q Adoptium Plan Nov 19, 2024
@Haroon-Khel
Copy link
Contributor

iirc I excluded it on linux only as that was the platform I was running tests on. I think it should also be excluded on MacOS since it was agreed that the test itself does not handle timezones well

@Haroon-Khel
Copy link
Contributor

Exclude pr adoptium/aqa-tests#5766

@sxa sxa moved this from Paused/Blocked to In Progress in 2024 4Q Adoptium Plan Nov 21, 2024
@sxa sxa moved this from In Progress to Paused/Blocked in 2024 4Q Adoptium Plan Nov 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Paused/Blocked
Development

No branches or pull requests

3 participants