This repository was archived by the owner on Dec 24, 2022. It is now read-only.
File tree Expand file tree Collapse file tree
tests/ServiceStack.Redis.Tests Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -247,7 +247,20 @@ public void Can_SlaveOfNoOne()
247247 [ Test ]
248248 public void Can_Save ( )
249249 {
250- Redis . Save ( ) ;
250+ try
251+ {
252+ Redis . Save ( ) ;
253+ }
254+ catch ( RedisResponseException e )
255+ {
256+ // if exception has that message then it still proves that BgSave works as expected.
257+ if ( e . Message . StartsWith ( "Can't BGSAVE while AOF log rewriting is in progress" )
258+ || e . Message . StartsWith ( "An AOF log rewriting in progress: can't BGSAVE right now" )
259+ || e . Message . StartsWith ( "Background save already in progress" ) )
260+ return ;
261+
262+ throw ;
263+ }
251264 }
252265
253266 [ Test ]
@@ -261,7 +274,8 @@ public void Can_BgSave()
261274 {
262275 // if exception has that message then it still proves that BgSave works as expected.
263276 if ( e . Message . StartsWith ( "Can't BGSAVE while AOF log rewriting is in progress" )
264- || e . Message . StartsWith ( "An AOF log rewriting in progress: can't BGSAVE right now" ) )
277+ || e . Message . StartsWith ( "An AOF log rewriting in progress: can't BGSAVE right now" )
278+ || e . Message . StartsWith ( "Background save already in progress" ) )
265279 return ;
266280
267281 throw ;
You can’t perform that action at this time.
0 commit comments