Hello, When running `./gradlew build` locally on ...
# contribute-code
i
Hello, When running
./gradlew build
locally on the current master branch of github are metadata-io module tests that use elasticsearch docker containers meant to fail? I'm getting the following stacktrace:
Copy code
> Task :metadata-io:test

com.linkedin.metadata.search.elasticsearch.ElasticSearchServiceTest.setup FAILED
    org.testcontainers.containers.ContainerLaunchException at ElasticSearchServiceTest.java:56
        Caused by: org.rnorth.ducttape.RetryCountExceededException at ElasticSearchServiceTest.java:56
            Caused by: org.testcontainers.containers.ContainerLaunchException at ElasticSearchServiceTest.java:56
                Caused by: java.lang.IllegalStateException at ElasticSearchServiceTest.java:56

com.linkedin.metadata.graph.ElasticSearchGraphServiceTest.setup FAILED
    org.testcontainers.containers.ContainerLaunchException at ElasticSearchGraphServiceTest.java:48
        Caused by: org.rnorth.ducttape.RetryCountExceededException at ElasticSearchGraphServiceTest.java:48
            Caused by: org.testcontainers.containers.ContainerLaunchException at ElasticSearchGraphServiceTest.java:48
                Caused by: java.lang.IllegalStateException at ElasticSearchGraphServiceTest.java:48

Gradle suite > Gradle test > com.linkedin.metadata.timeseries.elastic.ElasticSearchTimeseriesAspectServiceTest > testUpsertProfiles FAILED
    java.lang.RuntimeException at ElasticSearchTimeseriesAspectServiceTest.java:182
        Caused by: java.net.ConnectException at ElasticSearchTimeseriesAspectServiceTest.java:182
            Caused by: java.net.ConnectException

Gradle suite > Gradle test > com.linkedin.metadata.search.SearchServiceTest > wipe FAILED
    java.lang.RuntimeException at SearchServiceTest.java:71
        Caused by: java.net.ConnectException at SearchServiceTest.java:71
            Caused by: java.net.ConnectException

com.linkedin.metadata.systemmetadata.ElasticSearchSystemMetadataServiceTest.setup FAILED
    org.testcontainers.containers.ContainerLaunchException at ElasticSearchSystemMetadataServiceTest.java:39
        Caused by: org.rnorth.ducttape.RetryCountExceededException at ElasticSearchSystemMetadataServiceTest.java:39
            Caused by: org.testcontainers.containers.ContainerLaunchException at ElasticSearchSystemMetadataServiceTest.java:39
                Caused by: java.lang.IllegalStateException at ElasticSearchSystemMetadataServiceTest.java:39

298 tests completed, 5 failed, 151 skipped

> Task :metadata-io:test FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':metadata-io:test'.
> There were failing tests. See the report at: file:///Users/pedro/dev/fork-datahub/metadata-io/build/reports/tests/test/index.html

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at <https://help.gradle.org>

Deprecated Gradle features were used in this build, making it incompatible with Gradle 6.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See <https://docs.gradle.org/5.6.4/userguide/command_line_interface.html#sec:command_line_warnings>
m
Hey @incalculable-ocean-74010! they are not supposed to fail.. but we’ve heard that they fail once in a while.. is this a 100% reproducible thing for you?
i
So far yes
m
what does your docker desktop settings say?
how much memory does it have
i
The recomended configs as per the documentation (2 CPU, 8GB memory, 2GB swap, 10+ GB for disk)
I've just changed the configs so it could be that, let me run the tests again and get back to you
So the issue seemed to be docker engine config, solved now, compilation successful, thanks Shirshanka!
e
Awesome! What was the config that you changed?
i
Docker engine config as specified here (point 1). The issue was that I hadn't restarted the docker engine after changing the configs to set them into effect.
e
Got it!
m
Maybe we can check for docker configs before starting the tests
docker info | grep "Total Memory"
i
Use that as some sort of sanity check prior to running docker tests?
m
yeah
something like
<https://github.com/linkedin/datahub/blob/2f6fca169a2bce24d5c0ccecd5a0bbe177286fdb/metadata-ingestion/src/datahub/cli/docker_check.py#L70>
plus1 1
i