spring-attic / spring-cloud-gcp

Integration for Google Cloud Platform APIs with Spring
Apache License 2.0
704 stars 694 forks source link

Make Pub/Sub integration tests less flaky #2546

Closed meltsufin closed 3 years ago

sonarcloud[bot] commented 3 years ago

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities (and Security Hotspot 0 Security Hotspots to review)
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

warning The version of Java (1.8.0_151) you have used to run this analysis is deprecated and we will stop accepting it from October 2020. Please update to at least Java 11. Read more here

codecov[bot] commented 3 years ago

Codecov Report

Merging #2546 into master will decrease coverage by 7.20%. The diff coverage is n/a.

Impacted file tree graph

@@             Coverage Diff              @@
##             master    #2546      +/-   ##
============================================
- Coverage     81.48%   74.28%   -7.21%     
+ Complexity     2389     2162     -227     
============================================
  Files           267      267              
  Lines          7762     7762              
  Branches        803      803              
============================================
- Hits           6325     5766     -559     
- Misses         1098     1626     +528     
- Partials        339      370      +31     
Flag Coverage Δ Complexity Δ
#integration ? ?
#unittests 74.28% <ø> (ø) 2162.00 <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ Complexity Δ
...gcp/secretmanager/SecretManagerPropertySource.java 0.00% <0.00%> (-100.00%) 0.00% <0.00%> (-4.00%)
...a/spanner/repository/query/SpannerQueryMethod.java 0.00% <0.00%> (-100.00%) 0.00% <0.00%> (-6.00%)
...retmanager/SecretManagerPropertySourceLocator.java 0.00% <0.00%> (-100.00%) 0.00% <0.00%> (-2.00%)
...figure/config/GcpConfigBootstrapConfiguration.java 0.00% <0.00%> (-100.00%) 0.00% <0.00%> (-2.00%)
...e/spanner/GcpSpannerEmulatorAutoConfiguration.java 0.00% <0.00%> (-100.00%) 0.00% <0.00%> (-2.00%)
...epository/config/SpannerRepositoriesRegistrar.java 0.00% <0.00%> (-100.00%) 0.00% <0.00%> (-3.00%)
...ository/config/DatastoreRepositoriesRegistrar.java 0.00% <0.00%> (-100.00%) 0.00% <0.00%> (-3.00%)
...restore/GcpFirestoreEmulatorAutoConfiguration.java 0.00% <0.00%> (-84.85%) 0.00% <0.00%> (-4.00%)
...ramework/cloud/gcp/vision/DocumentOcrTemplate.java 17.64% <0.00%> (-73.53%) 4.00% <0.00%> (-5.00%)
...work/cloud/gcp/bigquery/core/BigQueryTemplate.java 0.00% <0.00%> (-71.70%) 0.00% <0.00%> (-8.00%)
... and 53 more

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 660f05a...06f6bc7. Read the comment docs.

meltsufin commented 3 years ago

This is definitely an improvement. We should still make topic/subscription names random to prevent flakes from multiple simultaneous builds.

The first one already uses random topic/subscription. The second is a sample test, which we can definitely improve by making the topic and subscription configurable. The same goes for a few other samples like the spring-cloud-gcp-integration-pubsub-json-sample. Do we have a tracking bug for this? It would be a good first issue for anyone. :)

elefeint commented 3 years ago

Yes, Travis filed #2533.