MCPcopy Create free account
hub / github.com/devfeel/dotweb / init

Function init

session/store_runtime_test.go:16–32  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

14var session_states []*SessionState
15
16func init() {
17 value := make(map[interface{}]interface{})
18 value["foo"] = "bar"
19 value["kak"] = "lal"
20
21 conf = NewDefaultRuntimeConfig()
22 runtime_store = NewRuntimeStore(conf)
23 runtime_store.list.Init()
24
25 session_state = NewSessionState(nil, "session_read", value)
26 for i := 0; i < 1000000; i++ {
27 session_states = append(session_states, NewSessionState(nil, "session_read"+strconv.Itoa(i), value))
28 }
29
30 runtime_store.SessionUpdate(session_state)
31 runtime_store.SessionUpdate(NewSessionState(nil, "session_read_1", value))
32}
33
34func TestRuntimeStore_SessionUpdate(t *testing.T) {
35 // Use a separate store for this test to avoid race conditions

Callers

nothing calls this directly

Calls 4

NewDefaultRuntimeConfigFunction · 0.85
NewRuntimeStoreFunction · 0.85
NewSessionStateFunction · 0.85
SessionUpdateMethod · 0.65

Tested by

no test coverage detected