Skip to content
Snippets Groups Projects
Commit 4b74741d authored by Goetz Lindenmaier's avatar Goetz Lindenmaier
Browse files

8284291: sun/security/krb5/auto/Renew.java fails intermittently on Windows 11

Backport-of: 05ae7ed1aac6fabc9c8820c12b6567fe93a3546f
parent e4860005
Branches
Tags
No related merge requests found
/*
* Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2015, 2022, 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
......@@ -82,7 +82,10 @@ public class Renew {
Date d1 = c.s().getPrivateCredentials(KerberosTicket.class).iterator().next().getAuthTime();
// 6s is longer than half of 10s
Thread.sleep(6000);
Date expiring = new Date(d1.getTime() + 6000);
while (new Date().before(expiring)) {
Thread.sleep(500);
}
// The second login uses the cache
c = Context.fromJAAS("second");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment