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:
Simone Basso 2021-06-23 13:36:45 +02:00 committed by GitHub
commit c74c94d616
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
32 changed files with 78 additions and 896 deletions

View file

@ -17,27 +17,15 @@ import (
func TestMaybeBuildFactory(t *testing.T) {
err := SafeErrWrapperBuilder{
ConnID: 1,
DialID: 10,
Error: errors.New("mocked error"),
TransactionID: 100,
Error: errors.New("mocked error"),
}.MaybeBuild()
var target *ErrWrapper
if errors.As(err, &target) == false {
t.Fatal("not the expected error type")
}
if target.ConnID != 1 {
t.Fatal("wrong ConnID")
}
if target.DialID != 10 {
t.Fatal("wrong DialID")
}
if target.Failure != "unknown_failure: mocked error" {
t.Fatal("the failure string is wrong")
}
if target.TransactionID != 100 {
t.Fatal("the transactionID is wrong")
}
if target.WrappedErr.Error() != "mocked error" {
t.Fatal("the wrapped error is wrong")
}