-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Trying to replicate issue with get_slice_range using raw thrift, same…
… result. "start key's md5 sorts after end key's md5. this is not allowed; you probably should not specify end key at all, under RandomPartitioner"
- Loading branch information
Kris Williams
committed
Apr 30, 2010
1 parent
bb9e3ff
commit 565c87e
Showing
6 changed files
with
154 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using Thrift.Transport; | ||
using Xunit; | ||
using Thrift.Protocol; | ||
using Apache.Cassandra; | ||
|
||
namespace Test | ||
{ | ||
using CassandraRunner = HectorSharp.Test.CassandraRunner; | ||
|
||
public class RawThriftFixture : IDisposable | ||
{ | ||
TTransport transport = new TSocket("localhost", 9060); | ||
Cassandra.Client client; | ||
public Cassandra.Client Client { get { return client;} } | ||
|
||
public RawThriftFixture() | ||
{ | ||
client = new Cassandra.Client(new TBinaryProtocol(transport)); | ||
} | ||
|
||
public void OpenConnection() | ||
{ | ||
if (!transport.IsOpen) | ||
{ | ||
Console.WriteLine("Opening Connection"); | ||
transport.Open(); | ||
} | ||
Assert.True(transport.IsOpen); | ||
} | ||
|
||
public void CloseConnection() | ||
{ | ||
if (transport.IsOpen) | ||
{ | ||
Console.WriteLine("Closing Connection"); | ||
transport.Close(); | ||
} | ||
Assert.False(transport.IsOpen); | ||
} | ||
|
||
public void RestartCassandra() | ||
{ | ||
if (CassandraRunner.Running) | ||
CassandraRunner.Stop(); | ||
CassandraRunner.CleanData(); | ||
CassandraRunner.Start(); | ||
Assert.True(CassandraRunner.Running); | ||
} | ||
|
||
public void StopCassandra() | ||
{ | ||
if (CassandraRunner.Running) | ||
CassandraRunner.Stop(); | ||
Assert.False(CassandraRunner.Running); | ||
} | ||
|
||
#region IDisposable Members | ||
|
||
public void Dispose() | ||
{ | ||
CloseConnection(); | ||
CassandraRunner.Stop(); | ||
CassandraRunner.CleanData(); | ||
} | ||
|
||
#endregion | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters