Skip to content

Commit

Permalink
Removing flecky test
Browse files Browse the repository at this point in the history
  • Loading branch information
Siddharth Chatrola committed Oct 5, 2017
1 parent 7cde053 commit b9a5b1d
Showing 1 changed file with 0 additions and 27 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -772,33 +772,6 @@ public void TryUpdateAndReleaseLockIfLockIdMatch_LargeLockTime_ExpireManuallyTes
}
}

[Fact]
public void TestingForceReconnect()
{
ProviderConfiguration pc = Utility.GetDefaultConfigUtility();
using (RedisServer redisServer = new RedisServer())
{
RedisSharedConnection.ReconnectFrequency = TimeSpan.FromMilliseconds(5);
RedisConnectionWrapper redisConn = GetRedisConnectionWrapperWithUniqueSession();

DateTimeOffset first_lastReconnectTime = RedisSharedConnection.lastReconnectTime;
// Inserting data into redis server
ChangeTrackingSessionStateItemCollection data = new ChangeTrackingSessionStateItemCollection(new RedisUtility(pc));
data["key"] = "value";
redisConn.Set(data, 900);
Assert.Equal(first_lastReconnectTime, RedisSharedConnection.lastReconnectTime);
System.Threading.Thread.Sleep(6);

//This should cause RedisConnectionException
redisServer.Restart();
redisConn.UpdateExpiryTime(900);

// This proves that force reconnect happened
Assert.NotEqual(first_lastReconnectTime, RedisSharedConnection.lastReconnectTime);
DisposeRedisConnectionWrapper(redisConn);
}
}

private IDatabase GetRealRedisConnection(RedisConnectionWrapper redisConn)
{
return (IDatabase)((StackExchangeClientConnection)redisConn.redisConnection).RealConnection;
Expand Down

0 comments on commit b9a5b1d

Please sign in to comment.