Skip to content

feat(bdd): add shared stream operations scenario for Go SDK#3245

Open
ex172000 wants to merge 5 commits into
apache:masterfrom
ex172000:qichao/convert-go-bdd-1
Open

feat(bdd): add shared stream operations scenario for Go SDK#3245
ex172000 wants to merge 5 commits into
apache:masterfrom
ex172000:qichao/convert-go-bdd-1

Conversation

@ex172000
Copy link
Copy Markdown
Contributor

Continues / supersedes #3063, which was auto-closed due to inactivity. The branch was force-pushed (rebase on current master plus a new fixup commit), so GitHub does not allow reopening the original PR.

Which issue does this PR close?

Related to #1986

What changed?

The four commits on this branch add a shared Gherkin feature file for stream CRUD operations and corresponding godog step definitions, then layer in update/delete for streams across all SDKs. The new commit on top addresses the remaining review feedback from #3063:

  • chengxilo: thenStreamDeletedSuccessfully now verifies via GetStream against the server instead of checking a local pointer that whenDeleteStream itself set to nil.
  • chengxilo: anchored all sc.Step regexes in bdd/go/tests/basic_messaging.go with ^...$ for consistency.
  • chengxilo: kept the per-scenario After cleanup but documented it as best-effort, with a note that a global cleanup script is the better long-term direction.
  • hubcio: made the stream-delete step explicit in the shared feature file (When I delete the stream with name "...") instead of relying on implicit prior-step state. Updated the Go, Rust, Python, Java, C#, and Node step definitions to match.

Local Execution

  • Branch rebased on current master.
  • go vet ./tests/... and go test -count=0 ./tests/... pass for bdd/go.
  • Pre-commit hooks pass (golangci-lint and csharp-dotnet-format were skipped locally due to toolchain gaps — golangci-lint pinned at v1.64.8 (Go 1.23) cannot lint a Go 1.25 project, and dotnet is not on this machine; CI will exercise both properly).

AI Usage

  1. Which tools? Claude Code
  2. Scope of usage? Generate functions under supervision and planning
  3. How did you verify the generated code works correctly? Build/vet on Go side, manual diff review on the other SDKs
  4. Can you explain every line of the code if asked? Yes

ex172000 and others added 5 commits May 12, 2026 15:23
)

Add a shared Gherkin feature file for stream CRUD operations and
corresponding godog step definitions, beginning the migration of Go
BDD tests from embedded Ginkgo scenarios to shared .feature files.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Move step definitions from stream_operations_test.go to
stream_operations.go (non-test file) and register the suite in
suite_test.go, matching the pattern used by basic_messaging and
leader_redirection. Update imports to use refactored Go SDK paths
(client, client/tcp, contracts).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
apache#1986)

Extend the shared basic_messaging.feature with stream update and delete
steps, covering full CRUD lifecycle. Add matching step definitions in
all 6 SDKs (Go, Python, Rust, Java, Node, C#). Add update_stream and
delete_stream methods to the Python SDK (PyO3). Remove the separate
stream_operations.feature and its Go-only implementation to avoid
duplication.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Use iggy::prelude::Identifier instead of iggy::identifier::Identifier
and unwrap Option<StreamDetails> from get_stream. Add null assertion
for stream.get() return value in Node step definition.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Verify stream deletion via GetStream rather than checking the local
  pointer, which whenDeleteStream sets to nil itself (chengxilo).
- Anchor all Go sc.Step regexes with ^...$ for consistency (chengxilo).
- Document the per-scenario After cleanup as best-effort and note the
  longer-term direction of a global cleanup script (chengxilo).
- Make the stream-delete step explicit by passing the stream name in
  the feature file instead of relying on implicit prior-step state
  (hubcio). Update Go, Rust, Python, Java, C#, and Node step
  definitions to match the new "I delete the stream with name ..."
  step.
@codecov
Copy link
Copy Markdown

codecov Bot commented May 13, 2026

Codecov Report

❌ Patch coverage is 0% with 31 lines in your changes missing coverage. Please review.
✅ Project coverage is 73.77%. Comparing base (9b9be19) to head (2fe260f).

Files with missing lines Patch % Lines
foreign/python/src/client.rs 0.00% 31 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master    #3245      +/-   ##
============================================
- Coverage     73.82%   73.77%   -0.05%     
  Complexity      943      943              
============================================
  Files          1190     1190              
  Lines        107832   107863      +31     
  Branches      84849    84866      +17     
============================================
- Hits          79606    79580      -26     
- Misses        25469    25508      +39     
- Partials       2757     2775      +18     
Components Coverage Δ
Rust Core 74.87% <ø> (ø)
Java SDK 60.14% <ø> (ø)
C# SDK 69.16% <ø> (-0.28%) ⬇️
Python SDK 77.42% <0.00%> (-4.02%) ⬇️
Node SDK 91.41% <ø> (-0.13%) ⬇️
Go SDK 39.80% <ø> (ø)
Files with missing lines Coverage Δ
foreign/python/src/client.rs 82.37% <0.00%> (-9.09%) ⬇️

... and 11 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.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant