Commit d1e47873 authored by Nick Craver's avatar Nick Craver

Tests: enhance expiry to check nulls

parent b45dea6b
......@@ -32,6 +32,8 @@ public async Task TestBasicExpiryTimeSpan(bool disablePTimes)
var d = conn.KeyTimeToLiveAsync(key);
conn.KeyExpire(key, TimeSpan.MaxValue, CommandFlags.FireAndForget);
var e = conn.KeyTimeToLiveAsync(key);
conn.KeyDelete(key, CommandFlags.FireAndForget);
var f = conn.KeyTimeToLiveAsync(key);
Assert.Null(await a);
var time = await b;
......@@ -42,6 +44,7 @@ public async Task TestBasicExpiryTimeSpan(bool disablePTimes)
Assert.NotNull(time);
Assert.True(time > TimeSpan.FromMinutes(89.9) && time <= TimeSpan.FromMinutes(90));
Assert.Null(await e);
Assert.Null(await f);
}
}
......@@ -70,6 +73,8 @@ public async Task TestBasicExpiryDateTime(bool disablePTimes, bool utc)
var d = conn.KeyTimeToLiveAsync(key);
conn.KeyExpire(key, DateTime.MaxValue, CommandFlags.FireAndForget);
var e = conn.KeyTimeToLiveAsync(key);
conn.KeyDelete(key, CommandFlags.FireAndForget);
var f = conn.KeyTimeToLiveAsync(key);
Assert.Null(await a);
var time = await b;
......@@ -83,6 +88,7 @@ public async Task TestBasicExpiryDateTime(bool disablePTimes, bool utc)
Assert.True(time >= TimeSpan.FromMinutes(89));
Assert.True(time <= TimeSpan.FromMinutes(90));
Assert.Null(await e);
Assert.Null(await f);
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment