Browse Source

raft: forceGoSched -> forceGosched

Xiang Li 11 years ago
parent
commit
45f56a5377
1 changed files with 3 additions and 3 deletions
  1. 3 3
      raft/node_test.go

+ 3 - 3
raft/node_test.go

@@ -96,7 +96,7 @@ func TestBlockProposal(t *testing.T) {
 		errc <- n.Propose(context.TODO(), []byte("somedata"))
 		errc <- n.Propose(context.TODO(), []byte("somedata"))
 	}()
 	}()
 
 
-	forceGoSched()
+	forceGosched()
 	select {
 	select {
 	case err := <-errc:
 	case err := <-errc:
 		t.Errorf("err = %v, want blocking", err)
 		t.Errorf("err = %v, want blocking", err)
@@ -104,7 +104,7 @@ func TestBlockProposal(t *testing.T) {
 	}
 	}
 
 
 	n.Campaign(context.TODO())
 	n.Campaign(context.TODO())
-	forceGoSched()
+	forceGosched()
 	select {
 	select {
 	case err := <-errc:
 	case err := <-errc:
 		if err != nil {
 		if err != nil {
@@ -215,7 +215,7 @@ func TestIsStateEqual(t *testing.T) {
 
 
 // WARNING: This is a hack.
 // WARNING: This is a hack.
 // Remove this when we are able to block/check the status of the go-routines.
 // Remove this when we are able to block/check the status of the go-routines.
-func forceGoSched() {
+func forceGosched() {
 	// possibility enough to sched upto 10 go routines.
 	// possibility enough to sched upto 10 go routines.
 	for i := 0; i < 10000; i++ {
 	for i := 0; i < 10000; i++ {
 		runtime.Gosched()
 		runtime.Gosched()