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

[BUG] Broken Key Vault JCA test (HttpUtilTest) #25422

Closed
3 tasks done
vcolin7 opened this issue Nov 16, 2021 · 0 comments · Fixed by #25453
Closed
3 tasks done

[BUG] Broken Key Vault JCA test (HttpUtilTest) #25422

vcolin7 opened this issue Nov 16, 2021 · 0 comments · Fixed by #25453
Assignees
Labels
azure-spring All azure-spring related issues bug This issue requires a change to an existing behavior in the product in order to be resolved. Client This issue points to a problem in the data-plane of the library. KeyVault test-reliability Issue that causes tests to be unreliable

Comments

@vcolin7
Copy link
Member

vcolin7 commented Nov 16, 2021

Describe the bug
Recently the Key Vault pipelines have started failing with this error. I'm not sure if this is a recent change, but it's impeding our ability to merge requests and release new Key Vault library versions.

Exception or Stack Trace
Taken from here (Microsoft internal).

To Reproduce
Run a Key Vault pipeline or simply mvn clean install for the Key Vault JCA package.

Code Snippet
This test case in HttpUtilTest:

@Test
public void testCustomizedHttpsClient() {
    String url = "https://mvnrepository.com/";
    String result = HttpUtil.get(url, null);
    assertNotNull(result);
    assertFalse(result.isEmpty());
}

That calls this method on HttpUtil:

public static String get(String url, Map<String, String> headers) {
    String result = null;
    try (CloseableHttpClient client = buildClient()) {
        HttpGet httpGet = new HttpGet(url);
        if (headers != null) {
            headers.forEach(httpGet::addHeader);
        }
        httpGet.addHeader(USER_AGENT_KEY, USER_AGENT_VALUE);
        result = client.execute(httpGet, createResponseHandler());
    } catch (IOException ioe) {
        LOGGER.log(WARNING, "Unable to finish the http get request.", ioe);
    }
    return result;
}

Expected behavior
No tests should fail.

Setup (please complete the following information):

  • OS: Windows 8
  • IDE: N/A
  • Library/Libraries: com.azure:azure-security-keyvault-jca:2.3.0-beta.1
  • Java version: 8
  • App Server/Environment: You can find the details here.

Information Checklist
Kindly make sure that you have added all the following information above and checkoff the required fields otherwise we will treat the issuer as an incomplete report

  • Bug Description Added
  • Repro Steps Added
  • Setup information Added
@ghost ghost added the needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. label Nov 16, 2021
@ghost ghost removed the needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. label Nov 16, 2021
@vcolin7 vcolin7 added needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. test-reliability Issue that causes tests to be unreliable labels Nov 16, 2021
@ghost ghost removed the needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. label Nov 16, 2021
@vcolin7 vcolin7 added needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. and removed needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. labels Nov 16, 2021
@saragluna saragluna added the azure-spring All azure-spring related issues label Nov 16, 2021
@yiliuTo yiliuTo added Client This issue points to a problem in the data-plane of the library. bug This issue requires a change to an existing behavior in the product in order to be resolved. labels Nov 16, 2021
@vcolin7 vcolin7 changed the title [BUG] Broken Key Vault JCA test (HttpUtilTest.). [BUG] Broken Key Vault JCA test (HttpUtilTest) Nov 16, 2021
chenrujun pushed a commit to chenrujun/azure-sdk-for-java that referenced this issue Nov 17, 2021
vcolin7 pushed a commit that referenced this issue Nov 17, 2021
XiaofeiCao pushed a commit to XiaofeiCao/azure-sdk-for-java that referenced this issue Nov 18, 2021
@github-actions github-actions bot locked and limited conversation to collaborators Apr 11, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
azure-spring All azure-spring related issues bug This issue requires a change to an existing behavior in the product in order to be resolved. Client This issue points to a problem in the data-plane of the library. KeyVault test-reliability Issue that causes tests to be unreliable
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants