Test changes.

This commit is contained in:
Greg 2018-08-10 08:19:32 -04:00
parent 17beaca380
commit 24d96151f4
2 changed files with 6 additions and 2 deletions

2
.gitignore vendored
View File

@ -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

View File

@ -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()
} }