From e827eb17bea64970ee67b3a5bcacfe57321a59f5 Mon Sep 17 00:00:00 2001
From: Silas Davis <silas@erisindustries.com>
Date: Mon, 12 Sep 2016 13:11:17 +0100
Subject: [PATCH] Attempt to deflake integration test (bind: address already in
 use issue)

---
 circle.yml                         | 4 ++--
 rpc/tendermint/test/common.go      | 7 ++++++-
 rpc/tendermint/test/runner/main.go | 3 +++
 3 files changed, 11 insertions(+), 3 deletions(-)

diff --git a/circle.yml b/circle.yml
index b2bacf46..dc1152dd 100644
--- a/circle.yml
+++ b/circle.yml
@@ -42,9 +42,9 @@ test:
   override:
     # We only wish to test our packages not vendored ones
     - echo "Running unit tests..."
-    - cd $GOPATH_REPO && glide novendor | xargs go test -v
+    - cd $GOPATH_REPO && go test -v `glide novendor`
     - echo "Running integration tests..."
-    - cd $GOPATH_REPO && glide novendor | xargs go test -v -tags integration
+    - cd $GOPATH_REPO && go test -v -tags integration `glide novendor`
 
 
 deployment:
diff --git a/rpc/tendermint/test/common.go b/rpc/tendermint/test/common.go
index 81832215..211d3549 100644
--- a/rpc/tendermint/test/common.go
+++ b/rpc/tendermint/test/common.go
@@ -1,13 +1,18 @@
+// +build integration
+
+// Space above here matters
 package test
 
 import (
 	"github.com/eris-ltd/eris-db/test/fixtures"
 	rpc_core "github.com/eris-ltd/eris-db/rpc/tendermint/core"
 	"testing"
+	"fmt"
 )
 
-// Needs to be in a _test.go file to be picked up
+// Needs to be referenced by a *_test.go file to be picked up
 func TestWrapper(runner func() int) int {
+	fmt.Println("Running with integration TestWrapper (rpc/tendermint/test/common.go)...")
 	ffs := fixtures.NewFileFixtures("Eris-DB")
 
 	defer ffs.RemoveAll()
diff --git a/rpc/tendermint/test/runner/main.go b/rpc/tendermint/test/runner/main.go
index 0c7fe656..a6836357 100644
--- a/rpc/tendermint/test/runner/main.go
+++ b/rpc/tendermint/test/runner/main.go
@@ -1,3 +1,6 @@
+// +build integration
+
+// Space above here matters
 package main
 
 import (
-- 
GitLab