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

8226706: (se) Reduce the number of outer loop iterations on Windows in java/nio/channels/Selector/RacyDeregister.java #2306

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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