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

Tests: Add start anchor to paralleltest exclusion regex #5046

Merged
merged 1 commit into from
Jan 27, 2023

Conversation

jdtzmn
Copy link
Contributor

@jdtzmn jdtzmn commented Jan 23, 2023

Summary

This PR adds a start anchor to the paralleltest exclusion regex within golang CI's configuration file. This fixes incorrect behavior that excluded test files that match package names in subdirectories, such as network_test.go within the netdeploy package.

Paralleltest exclusion regex currently follows a pattern similar to network.*_test\.go to exclude package directories, but this meant that network_test.go was excluded because it began with network. Adding ^ to the start of the regex fixed this issue.

Test Plan

I discovered this behavior while reviewing #4993. I confirmed locally that make lint 2>/dev/null | grep "paralleltest" had no output before these changes and that it now correctly identifies missing parallel flags within netdeploy/network_test.go.

@bbroder-algo
Copy link
Contributor

I think fix is in the original spirit of the regex.

@codecov
Copy link

codecov bot commented Jan 23, 2023

Codecov Report

Merging #5046 (01756ef) into master (285b897) will decrease coverage by 0.01%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master    #5046      +/-   ##
==========================================
- Coverage   53.56%   53.56%   -0.01%     
==========================================
  Files         430      430              
  Lines       54092    54092              
==========================================
- Hits        28974    28973       -1     
- Misses      22874    22877       +3     
+ Partials     2244     2242       -2     
Impacted Files Coverage Δ
agreement/cryptoVerifier.go 67.60% <0.00%> (-2.12%) ⬇️
agreement/proposalManager.go 96.07% <0.00%> (-1.97%) ⬇️
catchup/peerSelector.go 98.95% <0.00%> (-1.05%) ⬇️
cmd/tealdbg/debugger.go 71.65% <0.00%> (-0.79%) ⬇️
ledger/testing/randomAccounts.go 56.26% <0.00%> (-0.62%) ⬇️
ledger/catchpointtracker.go 58.49% <0.00%> (ø)
ledger/acctupdates.go 69.24% <0.00%> (+0.24%) ⬆️
catchup/service.go 69.32% <0.00%> (+0.24%) ⬆️
crypto/merkletrie/node.go 93.48% <0.00%> (+1.86%) ⬆️
crypto/merkletrie/trie.go 68.61% <0.00%> (+2.18%) ⬆️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

jdtzmn added a commit that referenced this pull request Jan 24, 2023
See #5046 for info on why these were not caught
@bbroder-algo
Copy link
Contributor

New tests that are now within the linter's scope for evaluation:

agreement/agreementtest/simulate_test.go
agreement/cryptoRequestContext_test.go
agreement/cryptoVerifier_test.go
agreement/fuzzer/catchupFilter_test.go
agreement/fuzzer/ledger_test.go
agreement/fuzzer/networkFacade_test.go
agreement/fuzzer/nodeCrashFilter_test.go
agreement/fuzzer/tests_test.go
agreement/gossip/networkFull_test.go
agreement/gossip/network_test.go
agreement/msgp_gen_test.go
agreement/pseudonode_test.go
catchup/ledgerFetcher_test.go
cmd/catchupsrv/download_test.go
cmd/goal/node_test.go
cmd/partitiontest_linter/linter_test.go
cmd/partitiontest_linter/testdata/linter_testdata_test.go
cmd/partitiontest_linter/testdata/linter_testdata_test.go
crypto/merklearray/msgp_gen_test.go
crypto/merklesignature/msgp_gen_test.go
crypto/merkletrie/node_test.go
crypto/msgp_gen_test.go
crypto/stateproof/builder_test.go
crypto/stateproof/coinGenerator_test.go
crypto/stateproof/committableSignatureSlot_test.go
crypto/stateproof/msgp_gen_test.go
crypto/stateproof/msgp_gen_test.go
crypto/stateproof/verifier_test.go
crypto/stateproof/weights_test.go
crypto/util_test.go
daemon/algod/api/server/v2/test/handlers_resources_test.go
daemon/algod/api/server/v2/test/handlers_test.go
daemon/algod/api/spec/v2/msgp_gen_test.go
data/account/msgp_gen_test.go
data/basics/msgp_gen_test.go
data/bookkeeping/genesis_test.go
data/bookkeeping/msgp_gen_test.go
data/committee/msgp_gen_test.go
data/hashable/msgp_gen_test.go
data/ledger_test.go
data/stateproofmsg/msgp_gen_test.go
data/stateproofmsg/msgp_gen_test.go
data/transactions/logic/ledger_test.go
data/transactions/msgp_gen_test.go
ledger/catchupaccessor_test.go
ledger/encoded/msgp_gen_test.go
ledger/ledgercore/accountdata_test.go
ledger/ledgercore/msgp_gen_test.go
ledger/msgp_gen_test.go
ledger/store/data_test.go
ledger/store/msgp_gen_test.go
ledger/testing/consensusRange_test.go
ledger/testing/randomAccounts_test.go
netdeploy/networkTemplates_test.go
netdeploy/network_test.go
node/msgp_gen_test.go
protocol/msgp_gen_test.go
protocol/test/msgp_gen_test.go
protocol/test/msgp_gen_test.go
rpcs/msgp_gen_test.go
stateproof/msgp_gen_test.go
test/commandandcontrol/cc_agent/component/agent_test.go
test/e2e-go/cli/goal/node_cleanup_test.go
test/e2e-go/features/catchup/basicCatchup_test.go
test/e2e-go/features/catchup/catchpointCatchup_test.go
test/e2e-go/features/stateproofs/stateproofs_test.go
test/e2e-go/upgrades/stateproof_participation_test.go
tools/network/dnssec/anchor_test.go
tools/network/dnssec/client_test.go
tools/network/dnssec/config_test.go
tools/network/dnssec/config_test.go
tools/network/dnssec/config_unix_test.go
tools/network/dnssec/config_unix_test.go
tools/network/dnssec/dnssec_test.go
tools/network/dnssec/sort_test.go
tools/network/dnssec/trustedchain_test.go
tools/network/dnssec/trustedzone_test.go
tools/network/dnssec/util_test.go
tools/network/dnssec/util_test.go
tools/network/resolveController_test.go
tools/network/resolver_test.go
tools/network/telemetryURIUpdateService_test.go

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

Successfully merging this pull request may close these issues.

3 participants