cleanup: remove ConnID, DialID, TransactionID (#395)
We are not using them anymore. The only nettest still using the legacy netx implementation is tor, for which setting these fields is useless, because it performs each measurement into a separate goroutine. Hence, let us start removing this part of the legacy netx codebase, which is hampering progress in other areas. Occurred to me while doing testing for the recent changes in error mapping (https://github.com/ooni/probe/issues/1505).
This commit is contained in:
parent
1fefe5d9b8
commit
c74c94d616
32 changed files with 78 additions and 896 deletions
|
|
@ -5,8 +5,6 @@ import (
|
|||
"errors"
|
||||
"testing"
|
||||
|
||||
"github.com/ooni/probe-cli/v3/internal/engine/legacy/netx/dialid"
|
||||
"github.com/ooni/probe-cli/v3/internal/engine/legacy/netx/transactionid"
|
||||
"github.com/ooni/probe-cli/v3/internal/engine/netx/errorx"
|
||||
"github.com/ooni/probe-cli/v3/internal/engine/netx/resolver"
|
||||
)
|
||||
|
|
@ -30,8 +28,6 @@ func TestErrorWrapperFailure(t *testing.T) {
|
|||
Resolver: resolver.NewFakeResolverThatFails(),
|
||||
}
|
||||
ctx := context.Background()
|
||||
ctx = dialid.WithDialID(ctx)
|
||||
ctx = transactionid.WithTransactionID(ctx)
|
||||
addrs, err := r.LookupHost(ctx, "dns.google.com")
|
||||
if addrs != nil {
|
||||
t.Fatal("expected nil addr here")
|
||||
|
|
@ -43,15 +39,6 @@ func TestErrorWrapperFailure(t *testing.T) {
|
|||
if errWrapper.Failure != errorx.FailureDNSNXDOMAINError {
|
||||
t.Fatal("unexpected failure")
|
||||
}
|
||||
if errWrapper.ConnID != 0 {
|
||||
t.Fatal("unexpected ConnID")
|
||||
}
|
||||
if errWrapper.DialID == 0 {
|
||||
t.Fatal("unexpected DialID")
|
||||
}
|
||||
if errWrapper.TransactionID == 0 {
|
||||
t.Fatal("unexpected TransactionID")
|
||||
}
|
||||
if errWrapper.Operation != errorx.ResolveOperation {
|
||||
t.Fatal("unexpected Operation")
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue