Skip to content

Commit

Permalink
8226706: (se) Reduce the number of outer loop iterations on Windows i…
Browse files Browse the repository at this point in the history
…n java/nio/channels/Selector/RacyDeregister.java

Backport-of: 4d1ff6a
  • Loading branch information
Amos Shi authored and GoeLin committed Dec 4, 2023
1 parent d4fcded commit 7dfd132
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions test/jdk/java/nio/channels/Selector/RacyDeregister.java
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2013, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2013, 2019, 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
Expand Down Expand Up @@ -41,11 +41,6 @@
*/
public class RacyDeregister {

// FIXME: NUM_OUTER_LOOP_ITERATIONS should be reverted to the hard-coded
// value 15 when JDK-8161083 is resolved as either a bug or a non-issue.
static final int NUM_OUTER_LOOP_ITERATIONS =
System.getProperty("os.name").startsWith("Windows") ? 150 : 15;

// 90% of 1200 second timeout as milliseconds
static final int TIMEOUT_THRESHOLD_MILLIS = 1200*900;

Expand Down Expand Up @@ -90,7 +85,7 @@ public static void main(String[] args) throws Exception {

public void run() {
try {
for (int k = 0; k < NUM_OUTER_LOOP_ITERATIONS; k++) {
for (int k = 0; k < 15; k++) {
System.out.format("outer loop %3d at %7d ms%n", k,
System.currentTimeMillis() - t0);
System.out.flush();
Expand Down

1 comment on commit 7dfd132

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.