Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
B
beego
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
go
beego
Commits
fa4a231c
Commit
fa4a231c
authored
Mar 25, 2016
by
JessonChan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
duration change to second
parent
850dc59b
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
6 additions
and
6 deletions
+6
-6
cache_test.go
cache/cache_test.go
+2
-2
memcache_test.go
cache/memcache/memcache_test.go
+1
-1
redis_test.go
cache/redis/redis_test.go
+2
-2
ssdb_test.go
cache/ssdb/ssdb_test.go
+1
-1
No files found.
cache/cache_test.go
View file @
fa4a231c
...
...
@@ -25,7 +25,7 @@ func TestCache(t *testing.T) {
if
err
!=
nil
{
t
.
Error
(
"init err"
)
}
timeoutDuration
:=
10
*
time
.
Second
timeoutDuration
:=
10
if
err
=
bm
.
Put
(
"astaxie"
,
1
,
timeoutDuration
*
time
.
Second
);
err
!=
nil
{
t
.
Error
(
"set Error"
,
err
)
}
...
...
@@ -102,7 +102,7 @@ func TestFileCache(t *testing.T) {
if
err
!=
nil
{
t
.
Error
(
"init err"
)
}
timeoutDuration
:=
10
*
time
.
Second
timeoutDuration
:=
10
if
err
=
bm
.
Put
(
"astaxie"
,
1
,
timeoutDuration
*
time
.
Second
);
err
!=
nil
{
t
.
Error
(
"set Error"
,
err
)
}
...
...
cache/memcache/memcache_test.go
View file @
fa4a231c
...
...
@@ -29,7 +29,7 @@ func TestMemcacheCache(t *testing.T) {
if
err
!=
nil
{
t
.
Error
(
"init err"
)
}
timeoutDuration
:=
10
*
time
.
Second
timeoutDuration
:=
10
if
err
=
bm
.
Put
(
"astaxie"
,
"1"
,
timeoutDuration
*
time
.
Second
);
err
!=
nil
{
t
.
Error
(
"set Error"
,
err
)
}
...
...
cache/redis/redis_test.go
View file @
fa4a231c
...
...
@@ -18,8 +18,8 @@ import (
"testing"
"time"
"github.com/garyburd/redigo/redis"
"github.com/astaxie/beego/cache"
"github.com/garyburd/redigo/redis"
)
func
TestRedisCache
(
t
*
testing
.
T
)
{
...
...
@@ -27,7 +27,7 @@ func TestRedisCache(t *testing.T) {
if
err
!=
nil
{
t
.
Error
(
"init err"
)
}
timeoutDuration
:=
10
*
time
.
Second
timeoutDuration
:=
10
if
err
=
bm
.
Put
(
"astaxie"
,
1
,
timeoutDuration
*
time
.
Second
);
err
!=
nil
{
t
.
Error
(
"set Error"
,
err
)
}
...
...
cache/ssdb/ssdb_test.go
View file @
fa4a231c
...
...
@@ -18,7 +18,7 @@ func TestSsdbcacheCache(t *testing.T) {
if
ssdb
.
IsExist
(
"ssdb"
)
{
t
.
Error
(
"check err"
)
}
timeoutDuration
:=
10
*
time
.
Second
timeoutDuration
:=
10
//timeoutDuration := -10*time.Second if timeoutDuration is negtive,it means permanent
if
err
=
ssdb
.
Put
(
"ssdb"
,
"ssdb"
,
timeoutDuration
*
time
.
Second
);
err
!=
nil
{
t
.
Error
(
"set Error"
,
err
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment