0
0
Fork 0
mirror of https://github.com/schollz/croc.git synced 2025-10-11 13:21:00 +02:00
This commit is contained in:
Zack Scholl 2018-09-24 08:35:24 -07:00
parent f6c2382c0a
commit 7891f27b62
2 changed files with 5 additions and 2 deletions

View file

@ -59,6 +59,8 @@ func Init(debug bool) (c *Croc) {
c.RelayTCPPort = "8154"
c.CurveType = "siec"
c.Address = "198.199.67.130"
c.AddressWebsocketPort = "8153"
c.AddressTCPPort = "8154"
c.NoRecipientPrompt = true
debugLevel := "info"
if debug {

View file

@ -16,7 +16,8 @@ import (
func sendAndReceive(t *testing.T, forceSend int) {
var startTime time.Time
var durationPerMegabyte float64
fname := generateRandomFile(100)
megabytes := 10
fname := generateRandomFile(megabytes)
var wg sync.WaitGroup
wg.Add(2)
go func() {
@ -36,7 +37,7 @@ func sendAndReceive(t *testing.T, forceSend int) {
c.ForceSend = forceSend
startTime = time.Now()
assert.Nil(t, c.Receive("test"))
durationPerMegabyte = 100.0 / time.Since(startTime).Seconds()
durationPerMegabyte = float64(megabytes) / time.Since(startTime).Seconds()
assert.True(t, utils.Exists(fname))
}()
wg.Wait()