From f6723df653787392a183c23590e32db1b4ed6445 Mon Sep 17 00:00:00 2001 From: r3inbowari Date: Thu, 2 May 2024 14:34:12 +0800 Subject: [PATCH] change: remove test --- speedtest/internal/welford_test.go | 28 ---------------------------- 1 file changed, 28 deletions(-) diff --git a/speedtest/internal/welford_test.go b/speedtest/internal/welford_test.go index 16c6edd..396c64b 100644 --- a/speedtest/internal/welford_test.go +++ b/speedtest/internal/welford_test.go @@ -2,7 +2,6 @@ package internal import ( "fmt" - "github.com/showwin/speedtest-go/speedtest" "math/rand" "testing" "time" @@ -34,30 +33,3 @@ func TestWOM(t *testing.T) { time.Sleep(time.Millisecond * 50) } } - -func TestGenTestData(t *testing.T) { - var speedtestClient = speedtest.New() - serverList, _ := speedtestClient.FetchServers() - targets, _ := serverList.FindServer([]int{}) - - var d []float64 - - speedtestClient.CallbackDownloadRate(func(downRate float64) { - d = append(d, downRate) - }) - - for _, s := range targets { - // Please make sure your host can access this test server, - // otherwise you will get an error. - // It is recommended to replace a server at this time - s.DownloadTest() - fmt.Printf("Latency: %s, Download: %f, Upload: %f\n", s.Latency, s.DLSpeed, s.ULSpeed) - s.Context.Reset() // reset counter - } - - fmt.Print("data := []float64{") - for _, val := range d { - fmt.Printf("%v, ", val) - } - fmt.Print("}") -}