Skip to content
Snippets Groups Projects
Commit f6780561 authored by Jono Wenger's avatar Jono Wenger
Browse files

Merge branch 'jono/codeFixes' into 'release'

Jono/code fixes

See merge request !513
parents 8f0121d7 79a1dc44
Branches
Tags
No related merge requests found
...@@ -26,5 +26,5 @@ func TrackResults(resultsCh chan ds.EventReturn, numResults int) (bool, int, int ...@@ -26,5 +26,5 @@ func TrackResults(resultsCh chan ds.EventReturn, numResults int) (bool, int, int
} }
} }
return (numTimeOut + numRoundFail) > 0, numRoundFail, numTimeOut return (numTimeOut + numRoundFail) == 0, numRoundFail, numTimeOut
} }
...@@ -101,11 +101,7 @@ func (t *testNetworkManagerGeneric) GetStoppable() stoppable.Stoppable { ...@@ -101,11 +101,7 @@ func (t *testNetworkManagerGeneric) GetStoppable() stoppable.Stoppable {
func InitTestingContextGeneric(i interface{}) (*storage.Session, interfaces.NetworkManager) { func InitTestingContextGeneric(i interface{}) (*storage.Session, interfaces.NetworkManager) {
switch i.(type) { switch i.(type) {
case *testing.T: case *testing.T, *testing.M, *testing.B, *testing.PB:
break
case *testing.M:
break
case *testing.B:
break break
default: default:
globals.Log.FATAL.Panicf("InitTestingSession is restricted to testing only. Got %T", i) globals.Log.FATAL.Panicf("InitTestingSession is restricted to testing only. Got %T", i)
...@@ -208,11 +204,7 @@ func (t *testNetworkManagerFullExchange) GetStoppable() stoppable.Stoppable { ...@@ -208,11 +204,7 @@ func (t *testNetworkManagerFullExchange) GetStoppable() stoppable.Stoppable {
func InitTestingContextFullExchange(i interface{}) (*storage.Session, *switchboard.Switchboard, interfaces.NetworkManager) { func InitTestingContextFullExchange(i interface{}) (*storage.Session, *switchboard.Switchboard, interfaces.NetworkManager) {
switch i.(type) { switch i.(type) {
case *testing.T: case *testing.T, *testing.M, *testing.B, *testing.PB:
break
case *testing.M:
break
case *testing.B:
break break
default: default:
globals.Log.FATAL.Panicf("InitTestingSession is restricted to testing only. Got %T", i) globals.Log.FATAL.Panicf("InitTestingSession is restricted to testing only. Got %T", i)
......
...@@ -243,11 +243,7 @@ func getSessionIDFromBaseKey(baseKey *cyclic.Int) SessionID { ...@@ -243,11 +243,7 @@ func getSessionIDFromBaseKey(baseKey *cyclic.Int) SessionID {
// FOR TESTING PURPOSES ONLY // FOR TESTING PURPOSES ONLY
func GetSessionIDFromBaseKeyForTesting(baseKey *cyclic.Int, i interface{}) SessionID { func GetSessionIDFromBaseKeyForTesting(baseKey *cyclic.Int, i interface{}) SessionID {
switch i.(type) { switch i.(type) {
case *testing.T: case *testing.T, *testing.M, *testing.B, *testing.PB:
break
case *testing.M:
break
case *testing.B:
break break
default: default:
globals.Log.FATAL.Panicf("GetSessionIDFromBaseKeyForTesting is restricted to testing only. Got %T", i) globals.Log.FATAL.Panicf("GetSessionIDFromBaseKeyForTesting is restricted to testing only. Got %T", i)
......
...@@ -290,11 +290,7 @@ func (s *Session) Delete(key string) error { ...@@ -290,11 +290,7 @@ func (s *Session) Delete(key string) error {
// FOR TESTING ONLY // FOR TESTING ONLY
func InitTestingSession(i interface{}) *Session { func InitTestingSession(i interface{}) *Session {
switch i.(type) { switch i.(type) {
case *testing.T: case *testing.T, *testing.M, *testing.B, *testing.PB:
break
case *testing.M:
break
case *testing.B:
break break
default: default:
globals.Log.FATAL.Panicf("InitTestingSession is restricted to testing only. Got %T", i) globals.Log.FATAL.Panicf("InitTestingSession is restricted to testing only. Got %T", i)
......
...@@ -2,10 +2,10 @@ package ud ...@@ -2,10 +2,10 @@ package ud
import ( import (
"github.com/pkg/errors" "github.com/pkg/errors"
jww "github.com/spf13/jwalterweatherman"
pb "gitlab.com/elixxir/comms/mixmessages" pb "gitlab.com/elixxir/comms/mixmessages"
"gitlab.com/xx_network/comms/connect" "gitlab.com/xx_network/comms/connect"
"gitlab.com/xx_network/comms/messages" "gitlab.com/xx_network/comms/messages"
jww "github.com/spf13/jwalterweatherman"
) )
type confirmFactComm interface { type confirmFactComm interface {
......
...@@ -2,11 +2,11 @@ package ud ...@@ -2,11 +2,11 @@ package ud
import ( import (
"github.com/pkg/errors" "github.com/pkg/errors"
jww "github.com/spf13/jwalterweatherman"
"gitlab.com/elixxir/comms/mixmessages" "gitlab.com/elixxir/comms/mixmessages"
"gitlab.com/elixxir/primitives/fact" "gitlab.com/elixxir/primitives/fact"
"gitlab.com/xx_network/comms/connect" "gitlab.com/xx_network/comms/connect"
"gitlab.com/xx_network/comms/messages" "gitlab.com/xx_network/comms/messages"
jww "github.com/spf13/jwalterweatherman"
) )
type removeFactComms interface { type removeFactComms interface {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment