Skip to content

Commit cd321cf

Browse files
committed
update TestCode
1 parent a5cb914 commit cd321cf

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

core/concurrenceMap_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ func TestItemContext_Current(t *testing.T) {
7272
func BenchmarkItemContext_Set_1(b *testing.B) {
7373
var num uint64 = 1
7474
for i := 0; i < b.N; i++ {
75-
ic.Set(string(num), num)
75+
ic.Set(fmt.Sprint(num), num)
7676
}
7777
}
7878

@@ -81,7 +81,7 @@ func BenchmarkItemContext_Set_Parallel(b *testing.B) {
8181
b.RunParallel(func(pb *testing.PB) {
8282
var num uint64 = 1
8383
for pb.Next() {
84-
ic.Set(string(num), num)
84+
ic.Set(fmt.Sprint(num), num)
8585
}
8686
})
8787
}

core/state_test.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ import (
99
"github.com/devfeel/dotweb/test"
1010
)
1111

12+
var GlobalState = NewServerStateInfo()
13+
1214
// function tests
1315

1416
func Test_AddRequestCount_1(t *testing.T) {

0 commit comments

Comments
 (0)