Skip to content
This repository has been archived by the owner on Sep 3, 2022. It is now read-only.

Commit

Permalink
Adding shutdown to test app
Browse files Browse the repository at this point in the history
  • Loading branch information
reuzel committed Oct 6, 2013
1 parent 2129309 commit dec90b2
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
11 changes: 8 additions & 3 deletions CqlTest/CartManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@
// See the License for the specific language governing permissions and
// limitations under the License.

using CqlSharp;
using CqlSharp.Protocol;
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using CqlSharp;
using CqlSharp.Protocol;

namespace CqlTest
{
Expand Down Expand Up @@ -79,7 +79,7 @@ public async Task PrepareDbAsync()
/// <returns> </returns>
public async Task<Cart> AddCartAsync(string groupId)
{
var c = new Cart {Id = Guid.NewGuid(), GroupId = groupId};
var c = new Cart { Id = Guid.NewGuid(), GroupId = groupId };

using (var connection = new CqlConnection("cartDB"))
{
Expand Down Expand Up @@ -181,5 +181,10 @@ public async Task<List<Cart>> FindCartsByGroupIdAsync(string groupId)
}
}
}

public void Shutdown()
{
CqlConnection.ShutdownAll();
}
}
}
2 changes: 2 additions & 0 deletions CqlTest/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,8 @@ public void Run(int queries, int threads, int prepared)
{
WriteStatistics(call.Key, call.Value);
}

_manager.Shutdown();
}

public string DoubleString(double value)
Expand Down

0 comments on commit dec90b2

Please sign in to comment.