Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

When a TimedOutException happens were marking the IsClientHealthy as …

…false, should be true as TimedOutException happens

on the timeout of a command, which still means the client is healthy to accept other requests.
  • Loading branch information...
commit 0a93c331577fe3ed5e948f3b3a342c0672d1bc19 1 parent 85528d9
@eplowe eplowe authored
View
2  FluentCassandra.sln
@@ -20,7 +20,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tests", "Tests", "{1A88B962
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluentCassandra.Tests", "test\FluentCassandra.Tests\FluentCassandra.Tests.csproj", "{9DAF7022-5820-4214-B13E-AC0A1B37691F}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ConsoleApplication2", "..\..\dev\BTCassandra.Interop\ConsoleApplication2\ConsoleApplication2.csproj", "{63108852-4D94-4726-8EE3-5DE5D50963E8}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TestPoolExhaustion", "..\..\dev\BTCassandra.Interop\ConsoleApplication2\TestPoolExhaustion.csproj", "{63108852-4D94-4726-8EE3-5DE5D50963E8}"
EndProject
Global
GlobalSection(TestCaseManagementSettings) = postSolution
View
2  src/Operations/CassandraOperationException.cs
@@ -21,7 +21,7 @@ public CassandraOperationException(UnavailableException exc)
: base("Cassandra server is unavailable.", exc, false, true) { }
public CassandraOperationException(TimedOutException exc)
- : base("Connection to Cassandra has timed out.", exc, false, true) { }
+ : base("Connection to Cassandra has timed out.", exc, true, true) { }
public CassandraOperationException(IOException exc)
: base(exc.Message, exc, false, true) {}
View
44 src/Operations/Operation.cs
@@ -5,21 +5,21 @@
namespace FluentCassandra.Operations
{
- public abstract class Operation<TResult>
- {
- public Operation()
- {
- HasError = false;
- }
+ public abstract class Operation<TResult>
+ {
+ public Operation()
+ {
+ HasError = false;
+ }
- public CassandraContext Context { get; set; }
- public CassandraSession Session { get; set; }
+ public CassandraContext Context { get; set; }
+ public CassandraSession Session { get; set; }
- public bool HasError { get; protected set; }
- public CassandraException Error { get; protected set; }
+ public bool HasError { get; protected set; }
+ public CassandraException Error { get; protected set; }
- public virtual bool TryExecute(out TResult result)
- {
+ public virtual bool TryExecute(out TResult result)
+ {
try
{
result = Execute();
@@ -60,17 +60,17 @@ public virtual bool TryExecute(out TResult result)
result = default(TResult);
}
- return !HasError;
- }
+ return !HasError;
+ }
- private void ExceptionOccurred(CassandraException exc)
- {
- Debug.WriteLine(exc);
+ private void ExceptionOccurred(CassandraException exc)
+ {
+ Debug.WriteLine(exc);
- HasError = true;
- Error = exc;
- }
+ HasError = true;
+ Error = exc;
+ }
- public abstract TResult Execute();
- }
+ public abstract TResult Execute();
+ }
}
Please sign in to comment.
Something went wrong with that request. Please try again.