Add erasure codec tests and fix subnet scan timeout.
Some checks failed
CI Docker Mining Proof / Linux agent hashrate proof (push) Has been cancelled
Some checks failed
CI Docker Mining Proof / Linux agent hashrate proof (push) Has been cancelled
Mock probePorts in scale limit tests so ScanLocalSubnet does not hang on live TCP dials; add erasure_codec error-path coverage from 0445b7e/d18c591 gaps.
This commit is contained in:
@@ -14,6 +14,10 @@ func TestScaleLimitConstants(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestScanLocalSubnetClampsToMaxHosts(t *testing.T) {
|
||||
prev := probePortsFn
|
||||
probePortsFn = func(host string, ports []int) []int { return nil }
|
||||
defer func() { probePortsFn = prev }()
|
||||
|
||||
_ = ScanLocalSubnet(999)
|
||||
_ = ScanLocalSubnet(0)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user