Browse Source

integration: log microsecond time for integration tests

Yicheng Qin 11 years ago
parent
commit
7af679333a
1 changed files with 6 additions and 0 deletions
  1. 6 0
      integration/cluster_test.go

+ 6 - 0
integration/cluster_test.go

@@ -3,6 +3,7 @@ package integration
 import (
 	"fmt"
 	"io/ioutil"
+	"log"
 	"net"
 	"net/http"
 	"net/http/httptest"
@@ -20,6 +21,11 @@ import (
 
 const tickDuration = 5 * time.Millisecond
 
+func init() {
+	// open microsecond-level time log for integration test debugging
+	log.SetFlags(log.Ltime | log.Lmicroseconds | log.Lshortfile)
+}
+
 func TestClusterOf1(t *testing.T) { testCluster(t, 1) }
 func TestClusterOf3(t *testing.T) { testCluster(t, 3) }