Improve and clean up integration tests, benchmark.

This commit is contained in:
Jakob Borg
2014-12-17 12:31:03 +01:00
parent b6cb7ddbaf
commit 2090530bbb
37 changed files with 696 additions and 1863 deletions

View File

@@ -15,11 +15,10 @@
// +build integration
package integration_test
package integration
import (
"log"
"strings"
"sync"
"testing"
"time"
@@ -81,8 +80,7 @@ func testRestartDuringTransfer(t *testing.T, restartSender, restartReceiver bool
for {
comp, err := sender.peerCompletion()
if err != nil {
if strings.Contains(err.Error(), "use of closed network connection") ||
strings.Contains(err.Error(), "request cancelled while waiting") {
if isTimeout(err) {
time.Sleep(250 * time.Millisecond)
continue
}