From db1a9f0dd27f61355a93f9c44659bbb2216df3c9 Mon Sep 17 00:00:00 2001 From: josh <josh@elixxir.io> Date: Wed, 31 Mar 2021 08:42:21 -0700 Subject: [PATCH] Improve upon testing in hostpool --- go.mod | 2 +- go.sum | 2 ++ network/gateway/{gateway_test.go => hostpool_test.go} | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) rename network/gateway/{gateway_test.go => hostpool_test.go} (99%) diff --git a/go.mod b/go.mod index 82682082c..20aa686ea 100644 --- a/go.mod +++ b/go.mod @@ -23,7 +23,7 @@ require ( gitlab.com/elixxir/crypto v0.0.7-0.20210319231554-b73b6e62ddbc gitlab.com/elixxir/ekv v0.1.4 gitlab.com/elixxir/primitives v0.0.3-0.20210309193003-ef42ebb4800b - gitlab.com/xx_network/comms v0.0.4-0.20210330224545-2d0e07fb64c6 + gitlab.com/xx_network/comms v0.0.4-0.20210331153942-daf17c8b6b47 gitlab.com/xx_network/crypto v0.0.5-0.20210319231335-249c6b1aa323 gitlab.com/xx_network/primitives v0.0.4-0.20210309173740-eb8cd411334a golang.org/x/crypto v0.0.0-20201221181555-eec23a3978ad diff --git a/go.sum b/go.sum index fe2dbe97e..773bc4faf 100644 --- a/go.sum +++ b/go.sum @@ -296,6 +296,8 @@ gitlab.com/xx_network/comms v0.0.4-0.20210329190058-55f9bdf16249 h1:dDcesEGcAzN1 gitlab.com/xx_network/comms v0.0.4-0.20210329190058-55f9bdf16249/go.mod h1:0Hx+zO3Pr4uYw4RZXFnPM3ocjY6bPIKDiHCjWTZLOSI= gitlab.com/xx_network/comms v0.0.4-0.20210330224545-2d0e07fb64c6 h1:LsxlArrT5mIM5rRbMuNp+PQPWrCbPKhunHO2MfznbsE= gitlab.com/xx_network/comms v0.0.4-0.20210330224545-2d0e07fb64c6/go.mod h1:0Hx+zO3Pr4uYw4RZXFnPM3ocjY6bPIKDiHCjWTZLOSI= +gitlab.com/xx_network/comms v0.0.4-0.20210331153942-daf17c8b6b47 h1:r8qBdMtuQouVylWl5RPctlXzPldcbhI2bvYkeUB1Ia0= +gitlab.com/xx_network/comms v0.0.4-0.20210331153942-daf17c8b6b47/go.mod h1:0Hx+zO3Pr4uYw4RZXFnPM3ocjY6bPIKDiHCjWTZLOSI= gitlab.com/xx_network/crypto v0.0.3/go.mod h1:DF2HYvvCw9wkBybXcXAgQMzX+MiGbFPjwt3t17VRqRE= gitlab.com/xx_network/crypto v0.0.4 h1:lpKOL5mTJ2awWMfgBy30oD/UvJVrWZzUimSHlOdZZxo= gitlab.com/xx_network/crypto v0.0.4/go.mod h1:+lcQEy+Th4eswFgQDwT0EXKp4AXrlubxalwQFH5O0Mk= diff --git a/network/gateway/gateway_test.go b/network/gateway/hostpool_test.go similarity index 99% rename from network/gateway/gateway_test.go rename to network/gateway/hostpool_test.go index c59930f25..83be2608f 100644 --- a/network/gateway/gateway_test.go +++ b/network/gateway/hostpool_test.go @@ -298,7 +298,7 @@ func TestHostPool_PruneHostPool(t *testing.T) { // Construct a host past the error threshold errorThresholdIndex := 0 overThreshold := params.errThreshold + 25 - hostList[errorThresholdIndex].SetMetricsTesting(overThreshold, t) + hostList[errorThresholdIndex].SetMetricsTesting(connect.NewMetricTesting(overThreshold, t), t) oldHost := hostList[0] // Call prune host pool -- GitLab