File tree Expand file tree Collapse file tree 2 files changed +11
-1
lines changed
main/scala/scredis/protocol/requests
test/scala/scredis/commands Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ object TransactionRequests {
2323 decoders : Seq [Decoder [Any ]]
2424 ) extends Request [Vector [Try [Any ]]](Exec ) {
2525 override def decode = {
26- case a : ArrayResponse => if (a.length > 0 ) {
26+ case a : ArrayResponse => if (a.length >= 0 ) {
2727 a.parsed[Vector ](decoders)
2828 } else {
2929 throw RedisTransactionAbortedException
Original file line number Diff line number Diff line change @@ -54,6 +54,11 @@ class TransactionCommandsSpec extends WordSpec
5454 }
5555
5656 " inTransaction" when {
57+ " no commands are queued" should {
58+ " succeed" taggedAs (V120 ) in {
59+ client.inTransaction(_ => ()).futureValue should be (empty)
60+ }
61+ }
5762 " all commands are valid" should {
5863 " succeed" taggedAs (V120 ) in {
5964 client.set(" STR" , SomeValue )
@@ -108,6 +113,11 @@ class TransactionCommandsSpec extends WordSpec
108113 }
109114
110115 " withTransaction" when {
116+ " no commands are queued" should {
117+ " succeed" taggedAs (V120 ) in {
118+ client.withTransaction(_ => ()) should be (())
119+ }
120+ }
111121 " all commands are valid" should {
112122 " succeed" taggedAs (V120 ) in {
113123 client.set(" STR" , SomeValue )
You can’t perform that action at this time.
0 commit comments