Skip to content

Commit

Permalink
8294958: java/net/httpclient/ConnectTimeout tests are slow
Browse files Browse the repository at this point in the history
Reviewed-by: dfuchs, aefimov
  • Loading branch information
djelinski committed Oct 11, 2022
1 parent 97f1321 commit fe70487
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 17 deletions.
8 changes: 1 addition & 7 deletions test/jdk/java/net/httpclient/AbstractConnectTimeout.java
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2018, 2020, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2018, 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
Expand Down Expand Up @@ -54,19 +54,13 @@ public abstract class AbstractConnectTimeout {

static List<List<Duration>> TIMEOUTS = List.of(
// connectTimeout HttpRequest timeout
Arrays.asList( NO_DURATION, ofSeconds(1) ),
Arrays.asList( NO_DURATION, ofMillis(100) ),
Arrays.asList( NO_DURATION, ofNanos(99) ),
Arrays.asList( NO_DURATION, ofNanos(1) ),

Arrays.asList( ofSeconds(1), NO_DURATION ),
Arrays.asList( ofMillis(100), NO_DURATION ),
Arrays.asList( ofNanos(99), NO_DURATION ),
Arrays.asList( ofNanos(1), NO_DURATION ),

Arrays.asList( ofSeconds(1), ofMinutes(1) ),
Arrays.asList( ofMillis(100), ofMinutes(1) ),
Arrays.asList( ofNanos(99), ofMinutes(1) ),
Arrays.asList( ofNanos(1), ofMinutes(1) )
);

Expand Down
14 changes: 4 additions & 10 deletions test/jdk/java/net/httpclient/AbstractConnectTimeoutHandshake.java
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2018, 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
Expand Down Expand Up @@ -68,17 +68,11 @@ public abstract class AbstractConnectTimeoutHandshake {

static List<List<Duration>> TIMEOUTS = List.of(
// connectTimeout HttpRequest timeout
Arrays.asList( NO_DURATION, ofSeconds(1) ),
Arrays.asList( NO_DURATION, ofSeconds(2) ),
Arrays.asList( NO_DURATION, ofMillis(500) ),
Arrays.asList( NO_DURATION, ofMillis(100) ),

Arrays.asList( ofSeconds(1), NO_DURATION ),
Arrays.asList( ofSeconds(2), NO_DURATION ),
Arrays.asList( ofMillis(500), NO_DURATION ),
Arrays.asList( ofMillis(100), NO_DURATION ),

Arrays.asList( ofSeconds(1), ofMinutes(1) ),
Arrays.asList( ofSeconds(2), ofMinutes(1) ),
Arrays.asList( ofMillis(500), ofMinutes(1) )
Arrays.asList( ofMillis(100), ofMinutes(1) )
);

static final List<String> METHODS = List.of("GET" , "POST");
Expand Down

3 comments on commit fe70487

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

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

@GoeLin
Copy link
Member

@GoeLin GoeLin commented on fe70487 Feb 13, 2023

Choose a reason for hiding this comment

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

/backport jdk17u-dev

@openjdk
Copy link

@openjdk openjdk bot commented on fe70487 Feb 13, 2023

Choose a reason for hiding this comment

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

@GoeLin the backport was successfully created on the branch GoeLin-backport-fe70487d in my personal fork of openjdk/jdk17u-dev. To create a pull request with this backport targeting openjdk/jdk17u-dev:master, just click the following link:

➡️ Create pull request

The title of the pull request is automatically filled in correctly and below you find a suggestion for the pull request body:

Hi all,

This pull request contains a backport of commit fe70487d from the openjdk/jdk repository.

The commit being backported was authored by Daniel Jeliński on 11 Oct 2022 and was reviewed by Daniel Fuchs and Aleksei Efimov.

Thanks!

If you need to update the source branch of the pull then run the following commands in a local clone of your personal fork of openjdk/jdk17u-dev:

$ git fetch https://github.com/openjdk-bots/jdk17u-dev GoeLin-backport-fe70487d:GoeLin-backport-fe70487d
$ git checkout GoeLin-backport-fe70487d
# make changes
$ git add paths/to/changed/files
$ git commit --message 'Describe additional changes made'
$ git push https://github.com/openjdk-bots/jdk17u-dev GoeLin-backport-fe70487d

Please sign in to comment.