summaryrefslogtreecommitdiff
path: root/tests/unit/multi.tcl
diff options
context:
space:
mode:
Diffstat (limited to 'tests/unit/multi.tcl')
-rw-r--r--tests/unit/multi.tcl14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/unit/multi.tcl b/tests/unit/multi.tcl
index 6655bf62c..9fcef71d6 100644
--- a/tests/unit/multi.tcl
+++ b/tests/unit/multi.tcl
@@ -306,4 +306,18 @@ start_server {tags {"multi"}} {
}
close_replication_stream $repl
}
+
+ test {DISCARD should not fail during OOM} {
+ set rd [redis_deferring_client]
+ $rd config set maxmemory 1
+ assert {[$rd read] eq {OK}}
+ r multi
+ catch {r set x 1} e
+ assert_match {OOM*} $e
+ r discard
+ $rd config set maxmemory 0
+ assert {[$rd read] eq {OK}}
+ $rd close
+ r ping
+ } {PONG}
}