(t *testing.T)
| 106 | } |
| 107 | |
| 108 | func TestRuntimeStore_SessionRemove(t *testing.T) { |
| 109 | // Use a separate store for this test |
| 110 | testStore := NewRuntimeStore(NewDefaultRuntimeConfig()) |
| 111 | testValue := make(map[interface{}]interface{}) |
| 112 | testValue["foo"] = "bar" |
| 113 | testValue["kak"] = "lal" |
| 114 | |
| 115 | testStore.SessionUpdate(NewSessionState(testStore, "session_read", testValue)) |
| 116 | |
| 117 | log.Println("session 删除测试") |
| 118 | fmt.Println("------------------------") |
| 119 | fmt.Println("before remove : ") |
| 120 | read, err := testStore.SessionRead("session_read") |
| 121 | if err != nil { |
| 122 | panic(err) |
| 123 | } |
| 124 | fmt.Println("read : ") |
| 125 | fmt.Printf("sessionid : %s , values : %v \n", read.SessionID(), read.values) |
| 126 | |
| 127 | err = testStore.SessionRemove("session_read") |
| 128 | if err != nil { |
| 129 | fmt.Println(err.Error()) |
| 130 | } |
| 131 | |
| 132 | fmt.Println("------------------------") |
| 133 | fmt.Println("after remove : ") |
| 134 | read, err = testStore.SessionRead("session_read") |
| 135 | if err != nil { |
| 136 | panic(err) |
| 137 | } |
| 138 | fmt.Println("read : ") |
| 139 | fmt.Printf("sessionid : %s , values : %v \n", read.SessionID(), read.values) |
| 140 | } |
| 141 | |
| 142 | func TestRuntimeStore_SessionGC(t *testing.T) { |
| 143 | // GC test - no assertions needed |
nothing calls this directly
no test coverage detected