Skip to content

Commit

Permalink
Removing unnecessary GOMAXPROCS in benchmarks
Browse files Browse the repository at this point in the history
  • Loading branch information
paulbellamy committed Mar 10, 2012
1 parent 6d064af commit 2ef973d
Show file tree
Hide file tree
Showing 8 changed files with 0 additions and 38 deletions.
5 changes: 0 additions & 5 deletions jsonp_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package mango
import (
"net/http"
"testing"
"runtime"
)

func jsonServer(env Env) (Status, Headers, Body) {
Expand All @@ -14,10 +13,6 @@ func nonJsonServer(env Env) (Status, Headers, Body) {
return 200, Headers{"Content-Type": []string{"text/html"}}, Body("<h1>Hello World!</h1>")
}

func init() {
runtime.GOMAXPROCS(4)
}

func TestJSONPSuccess(t *testing.T) {
// Compile the stack
jsonpStack := new(Stack)
Expand Down
5 changes: 0 additions & 5 deletions logger_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import (
"net/http"
"log"
"testing"
"runtime"
)

var loggerBuffer = &bytes.Buffer{}
Expand All @@ -15,10 +14,6 @@ func loggerTestServer(env Env) (Status, Headers, Body) {
return 200, Headers{}, Body("Hello World!")
}

func init() {
runtime.GOMAXPROCS(4)
}

func TestLogger(t *testing.T) {
// Compile the stack
loggerStack := new(Stack)
Expand Down
3 changes: 0 additions & 3 deletions mango_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,13 @@ import (
"testing"
"fmt"
"net/http"
"runtime"
)

func helloWorld(env Env) (Status, Headers, Body) {
return 200, Headers{}, Body("Hello World!")
}

func init() {
runtime.GOMAXPROCS(4)

fmt.Println("Testing Mango Version:", VersionString())
}

Expand Down
5 changes: 0 additions & 5 deletions redirect_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,12 @@ package mango
import (
"net/http"
"testing"
"runtime"
)

func redirectTestServer(env Env) (Status, Headers, Body) {
return Redirect(302, "/somewhere")
}

func init() {
runtime.GOMAXPROCS(4)
}

func TestRedirect(t *testing.T) {
// Compile the stack
redirectApp := new(Stack).Compile(redirectTestServer)
Expand Down
5 changes: 0 additions & 5 deletions routing_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package mango
import (
"net/http"
"testing"
"runtime"
)

func routingTestServer(env Env) (Status, Headers, Body) {
Expand All @@ -18,10 +17,6 @@ func routingBTestServer(env Env) (Status, Headers, Body) {
return 200, Headers{}, Body("Server B")
}

func init() {
runtime.GOMAXPROCS(4)
}

func TestRoutingSuccess(t *testing.T) {
// Compile the stack
routingStack := new(Stack)
Expand Down
5 changes: 0 additions & 5 deletions sessions_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,10 @@ package mango

import (
"net/http"
"runtime"
"strings"
"testing"
)

func init() {
runtime.GOMAXPROCS(4)
}

func TestSessionEncodingDecoding(t *testing.T) {
cookie := map[string]interface{}{"value": "foo"}
secret := "secret"
Expand Down
5 changes: 0 additions & 5 deletions show_errors_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,13 @@ package mango
import (
"net/http"
"testing"
"runtime"
)

func showErrorsTestServer(env Env) (Status, Headers, Body) {
panic("foo!")
return 200, Headers{}, Body("Hello World!")
}

func init() {
runtime.GOMAXPROCS(4)
}

func TestShowErrors(t *testing.T) {
// Compile the stack
showErrorsStack := new(Stack)
Expand Down
5 changes: 0 additions & 5 deletions static_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,12 @@ import (
"net/http"
"io/ioutil"
"testing"
"runtime"
)

func staticTestServer(env Env) (Status, Headers, Body) {
return 200, Headers{"Content-Type": []string{"text/html"}}, Body("<h1>Hello World!</h1>")
}

func init() {
runtime.GOMAXPROCS(4)
}

func TestStaticSuccess(t *testing.T) {
// Compile the stack
staticStack := new(Stack)
Expand Down

0 comments on commit 2ef973d

Please sign in to comment.