Permalink
Browse files

Switched to JSON in WRFLH.

  • Loading branch information...
1 parent 944a58d commit 3621188c35540ef350e8f6027cafe23879031cfd @anakryiko anakryiko committed Nov 14, 2012
Showing with 9 additions and 6 deletions.
  1. +9 −6 src/EventStore/EventStore.TestClient/Commands/WriteFloodHttpProcessor.cs
View
15 src/EventStore/EventStore.TestClient/Commands/WriteFloodHttpProcessor.cs
@@ -123,14 +123,15 @@ private void WriteFlood(CommandProcessorContext context, string eventStreamId, i
var url = context.Client.HttpEndpoint.ToHttpUrl("/streams/{0}", esId);
var write = new HttpClientMessageDto.WriteEventsText(
ExpectedVersion.Any,
- new[] {
+ new[]
+ {
new HttpClientMessageDto.ClientEventText(Guid.NewGuid(),
- "type",
- "DATA" + new string('*', 256),
- "METADATA" + new string('$', 100))
+ "type",
+ "DATA" + new string('*', 256),
+ "METADATA" + new string('$', 100))
});
- var requestString = Codec.Xml.To(write);
- client.Post(url, requestString, Codec.Xml.ContentType, succHandler, exc =>
+ var requestString = Codec.Json.To(write);
+ client.Post(url, requestString, Codec.Json.ContentType, succHandler, exc =>
{
context.Log.ErrorException(exc, "Error during POST.");
Interlocked.Increment(ref fail);
@@ -141,7 +142,9 @@ private void WriteFlood(CommandProcessorContext context, string eventStreamId, i
Interlocked.Increment(ref sent);
while (sent - received > context.Client.Options.WriteWindow)
+ {
Thread.Sleep(1);
+ }
}
}));
}

0 comments on commit 3621188

Please sign in to comment.