fix(bdd): make ./scripts/run-bdd-tests.sh actually support FEATURE flag#3384
fix(bdd): make ./scripts/run-bdd-tests.sh actually support FEATURE flag#3384chengxilo wants to merge 26 commits into
Conversation
|
Thanks for the PR. It is labeled Slash commands (own line, regular comment) move it around the queue:
See CONTRIBUTING.md for details. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #3384 +/- ##
============================================
- Coverage 74.46% 74.41% -0.06%
Complexity 943 943
============================================
Files 1231 1231
Lines 120911 120911
Branches 97648 97677 +29
============================================
- Hits 90042 89973 -69
- Misses 27918 27952 +34
- Partials 2951 2986 +35
🚀 New features to boost your workflow:
|
hubcio
left a comment
There was a problem hiding this comment.
one thing to confirm rather than a code issue: this PR drops the go -race BDD task (bdd-go-race, the -race flag and GO_TEST_EXTRA_FLAGS plumbing). no dangling references remain and the CI matrix entry goes away cleanly, so the removal itself is clean. worth a conscious sign-off on losing the data-race signal though - -race instruments the go test binary's own goroutines regardless of whether the server is real or mocked, so the "only applies to unit tests with a mock server" rationale isn't quite right. note coverage-baseline.yml still runs go test -race against tests/tcp_test, so some race coverage survives there.
Sorry it was a huge mistake. Fixed. I removed the -race from the coverage tho, since it only only cause nagative impact and we don't need race detection for coverage report. |
7bf8c80 to
1fb4cd8
Compare
1fb4cd8 to
2e82506
Compare
|
/ready |
| - -c | ||
| - >- | ||
| go test -v ${GO_TEST_EXTRA_FLAGS} | ||
| go test -v |
There was a problem hiding this comment.
the go coverage command lost ${GO_TEST_EXTRA_FLAGS} that the base docker-compose.yml go-bdd command still has. a compose override replaces the command rather than merging it, so under --coverage go-race and --coverage all the go coverage run no longer gets -race. restore it: go test -v ${GO_TEST_EXTRA_FLAGS:-} -coverpkg=... -coverprofile=/reports/go-bdd-coverage.out ./...
There was a problem hiding this comment.
-race and coverage serve different purposes, -race flag won't benefit the coverage flag. So I removed it intentionally. However, I think I can print a log to warn that ./scripts/run-bdd-tests.sh --coverage go-race won't use -race flag.
| ) | ||
|
|
||
| COMPOSE_FILES=(-f docker-compose.yml) | ||
| case "$FEATURE" in |
There was a problem hiding this comment.
this case matches basic_messaging|leader_redirection|all, which is every value FEATURE can hold (already validated above), so server.yml is added unconditionally - the branch is a no-op. just seed the array: COMPOSE_FILES=(-f docker-compose.yml -f docker-compose.server.yml) and keep the single case below for cluster.yml.
There was a problem hiding this comment.
I'm planning to build another scneario for reconnection. I will integrate a server into the iggy-server image to control the network and stop/kill the iggy-server, so the single server service won't be used
1. add Go SDK in structure and development section 2. add go-race in usage 3. Update How it Works 4. .github/changed-files-config.json -> .github/config/components.yml.
713e921 to
0e00c3a
Compare
112af6c to
2b56a33
Compare

Which issue does this PR address?
Relates to #2148
Rationale
In master branch, the
./scripts/run/bdd-tests.shdoesn't support choosing a feature, while there is aFEATUREvaraible.While this script is mainly for BDD test in CI, when we implement the bdd test it is also very helpful to verify if the BDD test works. So I hope this can be improved so when I build new test scenario, it won't take me 10 minutes to build and run everything everytime I wanna test it.
What changed?
In master branch, the
./scripts/run/bdd-tests.shdoesn't support choosing a feature, while there is aFEATUREvaraible. I splitted the docker-compose file for each.feature. Now when run basic_messaging scenario we only need to build and run thedocker-compose.server.ymlwhich create a single server, while in leader_redirection scenario we usedocker-compose.server.ymlanddocker-compose.cluster.ymltogether. It should increase the speed to run therun-bdd-tests.shthe
cleanis also updated by claude, but I think it makes sense so I kept it. Now if we use./scripts/run/bdd-tests.sh clean, it should clean up everything that is possible to be booted but failed to be removed. I didn't actually use it tho.And one extra change which is technically not in the scope, I removed go-race test in bdd, as I realized that it was a mistake to provide -race test in BDD test. It is only applicable for unit test with mock server.Local Execution
AI Usage