Skip to content

Commit

Permalink
change if/else condition
Browse files Browse the repository at this point in the history
  • Loading branch information
bilalcaliskan committed Nov 15, 2021
1 parent 8e66c48 commit c3f0cbd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions internal/raw/raw_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import (
)

func TestStartFlooding(t *testing.T) {
var err error
srcIps := getIps()
srcPorts := getPorts()
macAddrs := getMacAddrs()
Expand All @@ -33,7 +32,8 @@ func TestStartFlooding(t *testing.T) {
defer cancel()
t.Logf("starting flood, caseName=%s, floodMilliSeconds=%d\n", tc.name, tc.floodMilliSeconds)
go func() {
if err = StartFlooding(tc.dstIp, tc.dstPort, tc.payloadLength); err != nil {
err := StartFlooding(tc.dstIp, tc.dstPort, tc.payloadLength)
if err != nil {
t.Errorf("an error occured on flooding process, caseName=%s, floodMilliSeconds=%d, "+
"error=%s\n", tc.name, tc.floodMilliSeconds, err.Error())
return
Expand Down

0 comments on commit c3f0cbd

Please sign in to comment.