question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Flaky tests due to connection reset when downloading dependencies

See original GitHub issue

Test method

Happens before tests, in the build phase

Test logs

[2020-09-01T07:08:56.951Z] [ERROR] Failed to execute goal org.apache.maven.plugins:maven-enforcer-plugin:3.0.0-M1:enforce (enforce-java) on project apm-agent-parent: Execution enforce-java of goal org.apache.maven.plugins:maven-enforcer-plugin:3.0.0-M1:enforce failed: Plugin org.apache.maven.plugins:maven-enforcer-plugin:3.0.0-M1 or one of its dependencies could not be resolved: The following artifacts could not be resolved: org.apache.maven:maven-settings:jar:3.0, org.apache.maven:maven-repository-metadata:jar:3.0, org.apache.maven:maven-model-builder:jar:3.0: Could not transfer artifact org.apache.maven:maven-settings:jar:3.0 from/to central (https://repo.maven.apache.org/maven2): Transfer failed for https://repo.maven.apache.org/maven2/org/apache/maven/maven-settings/3.0/maven-settings-3.0.jar: Connection reset -> [Help 1]

Additional context

Lately, we see a lot of test failures because of Connection reset errors.

@elastic/observablt-robots do you know if there are network issues?

Also, why does maven even need to resolve the dependencies? Shouldn’t they be cached in the image via packer cache?

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:7 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
cachedoutcommented, Sep 1, 2020

Yup, I just tested this and was coming back here to say that it doesn’t appear to change the caching mechanism so this should be fine.

0reactions
v1vcommented, Sep 1, 2020

the clean goal should not affect with the cached dependencies, since it’s in charge for the clean up of the generated files within the workspace which are normally hosted in the target folder. The only case I imagine it will be required is when the workspace location and the .m2 point to the some location

Read more comments on GitHub >

github_iconTop Results From Across the Web

Gradle connection reset · Issue #2715 · actions/runner-images
Description gradle randomly throws connection reset error on macOS 10.14, ... while downloading Maven dependencies due to network timeouts, ...
Read more >
How to Fix Flaky Tests - Semaphore CI
Order dependency problems are caused when tests are executed in a different order than planned. One way to solve this issue is to...
Read more >
Eliminating Flaky Ruby Tests - Gusto Engineering
In Rails 5.1+ apps, the database connection is shared across threads and the transaction strategy can be used to avoid this altogether.
Read more >
How to reduce flaky test failures - CircleCI
Flaky tests, also known as flappers, fail to produce accurate and consistent results. These tests may be unreliable because of newly-written ...
Read more >
A Survey of Flaky Tests - Gregory Kapfhammer
The overarching picture painted by studies examining commit data, bug reports, developer survey responses, and pull requests suggests that timing dependencies.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found