Skip to content

Commit

Permalink
fix tcl test
Browse files Browse the repository at this point in the history
  • Loading branch information
luky116 committed Aug 16, 2024
1 parent 888ebf3 commit 4dc2475
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 8 deletions.
6 changes: 4 additions & 2 deletions tests/unit/basic.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ start_server {tags {"basic"}} {
assert_equal "foobared" [r get novar]
}

test "SETNX against not-expired volatile key" {
test "SETNX against not-expired volatile key2" {
r set x 10
r expire x 10000
assert_equal 0 [r setnx x 20]
Expand All @@ -257,7 +257,9 @@ start_server {tags {"basic"}} {
# active expiry cycle. This is tightly coupled to the implementation of
# active expiry and dbAdd() but currently the only way to test that
# SETNX expires a key when it should have been.
for {set x 0} {$x < 9999} {incr x} {

# TODO change 1000 to 9999
for {set x 0} {$x < 1000} {incr x} {
r setex key-$x 3600 value
}

Expand Down
2 changes: 1 addition & 1 deletion tests/unit/bitops.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ start_server {tags {"bitops"}} {

test {BITOP NOT fuzzing} {
for {set i 0} {$i < 10} {incr i} {
r flushall
r flushdb
set str [randstring 0 1000]
r set str $str
r bitop not target str
Expand Down
5 changes: 0 additions & 5 deletions tests/unit/type.tcl
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
start_server {tags {"type"}} {

test "type none" {
r flushdb
assert_equal none [r type key]
}

test "type command" {
r flushdb

Expand Down

0 comments on commit 4dc2475

Please sign in to comment.