Test changes.
This commit is contained in:
parent
17beaca380
commit
24d96151f4
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -2,3 +2,5 @@ test/basic/basic
|
||||||
test/basic/pgen.go
|
test/basic/pgen.go
|
||||||
test/basic/pgen_aaa.go
|
test/basic/pgen_aaa.go
|
||||||
test/basic/db
|
test/basic/db
|
||||||
|
test/tidy/db
|
||||||
|
test/tidy/pgen.go
|
||||||
|
|
|
@ -9,7 +9,7 @@ import (
|
||||||
func main() {
|
func main() {
|
||||||
tc := persist.TidyConfig{
|
tc := persist.TidyConfig{
|
||||||
Interval: 2 * time.Second,
|
Interval: 2 * time.Second,
|
||||||
Func:persist.ExpireAfter(-5 * time.Second),
|
Func: persist.ExpireAfter(-5 * time.Second),
|
||||||
}
|
}
|
||||||
persist.Init(persist.Config{Tidy: tc})
|
persist.Init(persist.Config{Tidy: tc})
|
||||||
|
|
||||||
|
@ -20,7 +20,9 @@ func main() {
|
||||||
x.Set(3)
|
x.Set(3)
|
||||||
persist.Commit()
|
persist.Commit()
|
||||||
fmt.Println(x.History())
|
fmt.Println(x.History())
|
||||||
time.Sleep(time.Second * 15)
|
time.Sleep(time.Second * 3)
|
||||||
|
fmt.Println(x.History())
|
||||||
|
time.Sleep(time.Second * 3)
|
||||||
fmt.Println(x.History())
|
fmt.Println(x.History())
|
||||||
persist.Shutdown()
|
persist.Shutdown()
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user