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

test: Add end to end forward migration followed by reverse migration #2240

Draft
wants to merge 13 commits into
base: main
Choose a base branch
from

Conversation

asthamohta
Copy link
Contributor

No description provided.

Copy link

codecov bot commented Mar 7, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 54.63%. Comparing base (039ffaa) to head (0d9b9d6).
Report is 38 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #2240      +/-   ##
============================================
+ Coverage     47.50%   54.63%   +7.13%     
+ Complexity     4101     1792    -2309     
============================================
  Files           880      436     -444     
  Lines         52585    24211   -28374     
  Branches       5569     2480    -3089     
============================================
- Hits          24978    13228   -11750     
+ Misses        25833    10186   -15647     
+ Partials       1774      797     -977     
Components Coverage Δ
spanner-templates 71.65% <ø> (+2.23%) ⬆️
spanner-import-export ∅ <ø> (∅)
spanner-live-forward-migration 78.42% <ø> (+0.77%) ⬆️
spanner-live-reverse-replication 80.40% <ø> (+0.71%) ⬆️
spanner-bulk-migration 87.77% <ø> (-0.66%) ⬇️

see 528 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Contributor

@darshan-sj darshan-sj left a comment

Choose a reason for hiding this comment

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

Overall changes look good. Left some comments

return PubsubResourceManager.builder(testName, PROJECT, credentialsProvider).build();
}

public SubscriptionName createPubsubResources(
Copy link
Contributor

Choose a reason for hiding this comment

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

Add a doc comment for this method explaining what "mode" is and allowed values.

return subscription;
}

protected void createAndUploadShardConfigToGcs(
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this shard config specific to Reverse replication? If so we should include ReverseReplication in the name of the method. like "createAndUploadReverseReplicationShardConfigToGcs"

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It is. Sure let me doi that

@Category({TemplateIntegrationTest.class, SkipDirectRunnerTest.class})
@TemplateIntegrationTest(DataStreamToSpanner.class)
@RunWith(JUnit4.class)
public class ForwardAndReverseMigrationEndToEndIT extends EndToEndTestingITBase {
Copy link
Contributor

Choose a reason for hiding this comment

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

Does this test use some static resources? If it uses static resources, it should not be part of IT test suite. Thumb rule is ITs should fully depend on mvn command line arguments and should not point to any static resources.

Also, how much time does this take to run? The IT tests run on every PR and if this takes too much time, then we should think about whether to execute it as part of PR build or not.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It doesnt use any static resources. It takes 20-25 minutes to run which is similar to other fwd migration it tests

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants