5748: gofmt fixes.
authorTom Clegg <tom@curoverse.com>
Fri, 15 May 2015 02:10:02 +0000 (22:10 -0400)
committerTom Clegg <tom@curoverse.com>
Fri, 15 May 2015 02:10:02 +0000 (22:10 -0400)
services/keepstore/bufferpool_test.go
services/keepstore/handler_test.go

index b2f63b1abbd04dd24993d5ba1a151d8af3034fe3..718e2cac6092fe4400e4d370945e17d603010dac 100644 (file)
@@ -10,8 +10,10 @@ import (
 func TestBufferPool(t *testing.T) {
        TestingT(t)
 }
+
 var _ = Suite(&BufferPoolSuite{})
-type BufferPoolSuite struct {}
+
+type BufferPoolSuite struct{}
 
 // Initialize a default-sized buffer pool for the benefit of test
 // suites that don't run main().
@@ -50,7 +52,7 @@ func testBufferPoolRace(c *C, bufs *bufferPool, unused []byte, expectWin string)
                race <- "Get"
        }()
        go func() {
-               time.Sleep(10*time.Millisecond)
+               time.Sleep(10 * time.Millisecond)
                bufs.Put(unused)
                race <- "Put"
        }()
@@ -81,5 +83,5 @@ func (s *BufferPoolSuite) TestBufferPoolReuse(c *C) {
                }
                last = next
        }
-       c.Check(reuses > allocs * 95/100, Equals, true)
+       c.Check(reuses > allocs*95/100, Equals, true)
 }
index 5c367ae916cb148bbf18f6f5c652df68acab2dce..5bd14be3499e123c648a6f97749a911d77ae5dd8 100644 (file)
@@ -821,10 +821,10 @@ func TestPutHandlerNoBufferleak(t *testing.T) {
                        unsigned_locator := "/" + TEST_HASH
                        response := IssueRequest(
                                &RequestTester{
-                               method:       "PUT",
-                               uri:          unsigned_locator,
-                               request_body: TEST_BLOCK,
-                       })
+                                       method:       "PUT",
+                                       uri:          unsigned_locator,
+                                       request_body: TEST_BLOCK,
+                               })
                        ExpectStatusCode(t,
                                "TestPutHandlerBufferleak", http.StatusOK, response)
                        ExpectBody(t,
@@ -834,7 +834,7 @@ func TestPutHandlerNoBufferleak(t *testing.T) {
                ok <- true
        }()
        select {
-       case <-time.After(20*time.Second):
+       case <-time.After(20 * time.Second):
                // If the buffer pool leaks, the test goroutine hangs.
                t.Fatal("test did not finish, assuming pool leaked")
        case <-ok:
@@ -863,9 +863,9 @@ func TestGetHandlerNoBufferleak(t *testing.T) {
                        unsigned_locator := "/" + TEST_HASH
                        response := IssueRequest(
                                &RequestTester{
-                               method: "GET",
-                               uri:    unsigned_locator,
-                       })
+                                       method: "GET",
+                                       uri:    unsigned_locator,
+                               })
                        ExpectStatusCode(t,
                                "Unauthenticated request, unsigned locator", http.StatusOK, response)
                        ExpectBody(t,
@@ -876,7 +876,7 @@ func TestGetHandlerNoBufferleak(t *testing.T) {
                ok <- true
        }()
        select {
-       case <-time.After(20*time.Second):
+       case <-time.After(20 * time.Second):
                // If the buffer pool leaks, the test goroutine hangs.
                t.Fatal("test did not finish, assuming pool leaked")
        case <-ok: