test(e2e): fix TestAddNodeOriginAdvanced flakiness and improve observability#389
Conversation
Up to standards ✅🟢 Issues
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThis PR enhances the ChangesE2E Test Flow and Diagnostics
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
This PR enhance TestAddNodeOriginAdvanced E2E test reliability and observability by increasing context timeout to 10 minutes and adding comprehensive step-by-step logging.
Changes
WaitForReplication()call after node update to ensure sync completes before assertionTesting
make test-e2e E2E_FIXTURE=lima E2E_RUN=TestAddNodeOriginAdvanced
/Users/sivat/go/bin/gotestsum
--format-hide-empty-pkg
--format standard-verbose
--rerun-fails=0
--rerun-fails-max-failures=4
--packages='./e2e/...'
--
-tags=e2e_test -count=1 -timeout=45m -parallel 4 -run TestAddNodeOriginAdvanced -args -fixture lima
2026/05/20 15:16:18 initializing cluster
2026/05/20 15:16:18 cluster initialized
=== RUN TestAddNodeOriginAdvanced
=== PAUSE TestAddNodeOriginAdvanced
=== CONT TestAddNodeOriginAdvanced
add_node_data_safety_test.go:40: Step 1: Creating 2-node database fixture
add_node_data_safety_test.go:58: Database created: 65567e2d-c4cb-484b-b54f-b8e034b7a781
add_node_data_safety_test.go:62: Step 2: Writing 100 test rows to n2
add_node_data_safety_test.go:77: Test data written successfully
add_node_data_safety_test.go:80: Step 3: Adding n3 node with n1 as source
add_node_data_safety_test.go:86: Starting database update to add n3 (this may take several minutes)
add_node_data_safety_test.go:88: Database update completed, n3 node added successfully
add_node_data_safety_test.go:90: Step 3b: Waiting for replication to complete across all nodes
database_test.go:357: [TestAddNodeOriginAdvanced] waiting for replication to catch up on all nodes
add_node_data_safety_test.go:92: Replication complete
add_node_data_safety_test.go:97: Step 4: Checking replication origin on n3 (slot name: spk_origin_adv_db_n2_sub_n2_n3)
add_node_data_safety_test.go:116: Replication origin LSN: 0/1D569A0 (expected: not 0/0)
add_node_data_safety_test.go:123: Test completed successfully
fixture_test.go:200: cleaning up database 65567e2d-c4cb-484b-b54f-b8e034b7a781
--- PASS: TestAddNodeOriginAdvanced (543.14s)
PASS
ok github.com/pgEdge/control-plane/e2e 543.641s
DONE 1 tests in 543.611s
Checklist
PLAT-617