Skip to content

Commit 0753376

Browse files
committedMar 4, 2025
8297531: sun/security/krb5/MicroTime.java fails with "Exception: What? only 100 musec precision?"
Reviewed-by: mullan, abarashev
1 parent 5598792 commit 0753376

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed
 

‎test/jdk/sun/security/krb5/MicroTime.java

+5-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2010, 2025, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -44,9 +44,10 @@ public static void main(String[] args) throws Exception {
4444
count++;
4545
}
4646
}
47-
// We believe a nice KerberosTime can at least tell the
48-
// difference of 100 musec.
49-
if (count < 10000) {
47+
// Before JDK-6882687, KerberosTime was measured in milliseconds.
48+
// Now it's in microseconds. We should be able to record more than
49+
// 1000 distinct KerberosTime values within one second.
50+
if (count < 1001) {
5051
throw new Exception("What? only " + (1000000/count) +
5152
" musec precision?");
5253
}

0 commit comments

Comments
 (0)
Please sign in to comment.