Files
go-cart-actor/discarded-host_test.go
matst80 0fe6cb0920
All checks were successful
Build and Publish / BuildAndDeployAmd64 (push) Successful in 29s
Build and Publish / BuildAndDeploy (push) Successful in 2m29s
discarded host handler
2024-11-14 18:52:51 +01:00

18 lines
279 B
Go

package main
import (
"testing"
"time"
)
func TestDiscardedHost(t *testing.T) {
dh := NewDiscardedHostHandler(func(host string) {
t.Log(host)
}, 8080)
dh.AppendHost("localhost")
time.Sleep(2 * time.Second)
if dh.hosts[0].Tries == 0 {
t.Error("Host not tested")
}
}