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,13 +15,12 @@
// +build integration
package integration_test
package integration
import (
"bytes"
"encoding/json"
"log"
"strings"
"testing"
"time"
@@ -105,7 +104,7 @@ func TestManyPeers(t *testing.T) {
for {
comp, err := sender.peerCompletion()
if err != nil {
if strings.Contains(err.Error(), "use of closed network connection") {
if isTimeout(err) {
time.Sleep(250 * time.Millisecond)
continue
}