]> git.saurik.com Git - redis.git/blobdiff - tests/unit/other.tcl
Test: fixed osx "leaks" support in test.
[redis.git] / tests / unit / other.tcl
index 6bdb0b3f96fcd727c2fa0700e35914d5d9120ba1..a53f3f5c81bed61aca3d0d8abd60aa710a8215fe 100644 (file)
@@ -141,6 +141,11 @@ start_server {tags {"other"}} {
 
         # Reload and check
         waitForBgrewriteaof r
+        # We need to wait two seconds to avoid false positives here, otherwise
+        # the DEBUG LOADAOF command may read a partial file.
+        # Another solution would be to set the fsync policy to no, since this
+        # prevents write() to be delayed by the completion of fsync().
+        after 2000
         r debug loadaof
         set ttl [r ttl x]
         assert {$ttl > 900 && $ttl <= 1000}
@@ -188,53 +193,6 @@ start_server {tags {"other"}} {
         } {1}
     }
 
-    test {MUTLI / EXEC basics} {
-        r del mylist
-        r rpush mylist a
-        r rpush mylist b
-        r rpush mylist c
-        r multi
-        set v1 [r lrange mylist 0 -1]
-        set v2 [r ping]
-        set v3 [r exec]
-        list $v1 $v2 $v3
-    } {QUEUED QUEUED {{a b c} PONG}}
-
-    test {DISCARD} {
-        r del mylist
-        r rpush mylist a
-        r rpush mylist b
-        r rpush mylist c
-        r multi
-        set v1 [r del mylist]
-        set v2 [r discard]
-        set v3 [r lrange mylist 0 -1]
-        list $v1 $v2 $v3
-    } {QUEUED OK {a b c}}
-
-    test {Nested MULTI are not allowed} {
-        set err {}
-        r multi
-        catch {[r multi]} err
-        r exec
-        set _ $err
-    } {*ERR MULTI*}
-
-    test {MULTI where commands alter argc/argv} {
-        r sadd myset a
-        r multi
-        r spop myset
-        list [r exec] [r exists myset]
-    } {a 0}
-
-    test {WATCH inside MULTI is not allowed} {
-        set err {}
-        r multi
-        catch {[r watch x]} err
-        r exec
-        set _ $err
-    } {*ERR WATCH*}
-
     test {APPEND basics} {
         list [r append foo bar] [r get foo] \
              [r append foo 100] [r get foo]