Permalink
Browse files

Merge branch 'dev' of github.com:/EventStore/EventStore into dev

  • Loading branch information...
2 parents 1c20f62 + 5913029 commit 944a58d2ef8db64fdaaf5a3b8608548f7bf36455 @MarkiyanMatsekh MarkiyanMatsekh committed Nov 14, 2012
Showing with 808 additions and 592 deletions.
  1. +1 −1 src/EventStore/EventStore.ClientAPI/ClientOperations/AppendToStreamOperation.cs
  2. +4 −1 src/EventStore/EventStore.ClientAPI/ClientOperations/CreateStreamOperation.cs
  3. +1 −1 src/EventStore/EventStore.ClientAPI/ClientOperations/TransactionalWriteOperation.cs
  4. +4 −4 src/EventStore/EventStore.ClientAPI/EventStoreConnection.cs
  5. +1 −0 src/EventStore/EventStore.ClientAPI/IEvent.cs
  6. +13 −5 src/EventStore/EventStore.ClientAPI/Messages/ClientMessage.cs
  7. +13 −13 src/EventStore/EventStore.Core.Tests/ClientAPI/AllEvents/read_all_events_backward_should.cs
  8. +16 −16 src/EventStore/EventStore.Core.Tests/ClientAPI/AllEvents/read_all_events_forward_should.cs
  9. +3 −3 src/EventStore/EventStore.Core.Tests/ClientAPI/AllEvents/subscribe_to_all_should.cs
  10. +1 −1 src/EventStore/EventStore.Core.Tests/ClientAPI/MiniNode.cs
  11. +3 −0 src/EventStore/EventStore.Core.Tests/ClientAPI/TestEvent.cs
  12. +7 −7 src/EventStore/EventStore.Core.Tests/ClientAPI/append_to_stream.cs
  13. +6 −6 src/EventStore/EventStore.Core.Tests/ClientAPI/creating_stream.cs
  14. +4 −4 src/EventStore/EventStore.Core.Tests/ClientAPI/deleting_stream.cs
  15. +8 −8 src/EventStore/EventStore.Core.Tests/ClientAPI/read_event_stream_backward_should.cs
  16. +9 −9 src/EventStore/EventStore.Core.Tests/ClientAPI/read_event_stream_forward_should.cs
  17. +5 −5 src/EventStore/EventStore.Core.Tests/ClientAPI/subscribe_should.cs
  18. +4 −4 src/EventStore/EventStore.Core.Tests/ClientAPI/transaction.cs
  19. +1 −1 ...ore/EventStore.Core.Tests/Services/Replication/CreateStream/when_create_stream_accepts_request.cs
  20. +1 −1 ...ntStore.Core.Tests/Services/Replication/CreateStream/when_create_stream_completes_successfully.cs
  21. +1 −1 ...ntStore.Core.Tests/Services/Replication/CreateStream/when_create_stream_gets_already_committed.cs
  22. +1 −1 ...s/Services/Replication/CreateStream/when_create_stream_gets_commit_timeout_before_commit_stage.cs
  23. +1 −1 ...s/Services/Replication/CreateStream/when_create_stream_gets_commit_timeout_before_final_commit.cs
  24. +1 −1 ...Tests/Services/Replication/CreateStream/when_create_stream_gets_prepare_timeout_after_prepares.cs
  25. +1 −1 ...ests/Services/Replication/CreateStream/when_create_stream_gets_prepare_timeout_before_prepares.cs
  26. +1 −1 ...EventStore.Core.Tests/Services/Replication/CreateStream/when_create_stream_gets_stream_deleted.cs
  27. +1 −1 src/EventStore/EventStore.Core.Tests/Services/Replication/RequestManagerSpecification.cs
  28. +2 −0 src/EventStore/EventStore.Core.Tests/Services/Transport/Http/auto_convertion.cs
  29. +1 −0 src/EventStore/EventStore.Core.Tests/Services/Transport/Http/ping_controller_should.cs
  30. +7 −1 src/EventStore/EventStore.Core/EventStore.Core.csproj
  31. +3 −1 src/EventStore/EventStore.Core/Messages/ClientMessage.cs
  32. +3 −0 src/EventStore/EventStore.Core/Messages/StorageMessage.cs
  33. +13 −4 src/EventStore/EventStore.Core/Messages/TcpClientMessageDto.cs
  34. +1 −1 ...EventStore/EventStore.Core/Services/RequestManager/Managers/CreateStreamTwoPhaseRequestManager.cs
  35. +54 −49 src/EventStore/EventStore.Core/Services/Transport/Http/AutoEventConverter.cs
  36. +0 −376 src/EventStore/EventStore.Core/Services/Transport/Http/Codecs.cs
  37. +49 −0 src/EventStore/EventStore.Core/Services/Transport/Http/Codecs/Codec.cs
  38. +54 −0 src/EventStore/EventStore.Core/Services/Transport/Http/Codecs/CustomCodec.cs
  39. +72 −0 src/EventStore/EventStore.Core/Services/Transport/Http/Codecs/JsonCodec.cs
  40. +30 −0 src/EventStore/EventStore.Core/Services/Transport/Http/Codecs/ManualEncoding.cs
  41. +30 −0 src/EventStore/EventStore.Core/Services/Transport/Http/Codecs/NoCodec.cs
  42. +33 −0 src/EventStore/EventStore.Core/Services/Transport/Http/Codecs/TextCodec.cs
  43. +83 −0 src/EventStore/EventStore.Core/Services/Transport/Http/Codecs/XmlCodec.cs
  44. +1 −0 src/EventStore/EventStore.Core/Services/Transport/Http/Controllers/AdminController.cs
  45. +2 −1 src/EventStore/EventStore.Core/Services/Transport/Http/Controllers/AtomControllerDefinitions.cs
  46. +1 −0 src/EventStore/EventStore.Core/Services/Transport/Http/Controllers/PingController.cs
  47. +1 −0 src/EventStore/EventStore.Core/Services/Transport/Http/Controllers/ReadEventDataController.cs
  48. +1 −0 src/EventStore/EventStore.Core/Services/Transport/Http/Controllers/StatController.cs
  49. +1 −0 src/EventStore/EventStore.Core/Services/Transport/Http/Controllers/WebSiteController.cs
  50. +1 −0 src/EventStore/EventStore.Core/Services/Transport/Http/HttpService.cs
  51. +6 −6 src/EventStore/EventStore.Core/Services/Transport/Tcp/ClientTcpDispatcher.cs
  52. +21 −20 src/EventStore/EventStore.Core/Services/VNode/SingleVNodeController.cs
  53. +1 −0 src/EventStore/EventStore.Core/Util/MiniWeb.cs
  54. +1 −0 src/EventStore/EventStore.Projections.Core/Services/Http/ProjectionsController.cs
  55. +1 −0 src/EventStore/EventStore.TestClient/Client.cs
  56. +2 −1 src/EventStore/EventStore.TestClient/Commands/CreateStreamProcessor.cs
  57. +2 −1 src/EventStore/EventStore.TestClient/Commands/DvuBasic/BankAccountBasicProducer.cs
  58. +1 −0 src/EventStore/EventStore.TestClient/Commands/MultiWriteFloodWaiting.cs
  59. +1 −0 src/EventStore/EventStore.TestClient/Commands/MultiWriteProcessor.cs
  60. +2 −3 src/EventStore/EventStore.TestClient/Commands/ReadHttpProcessor.cs
  61. +5 −0 src/EventStore/EventStore.TestClient/Commands/RunTestScenarios/BankAccountEvent.cs
  62. +1 −0 src/EventStore/EventStore.TestClient/Commands/RunTestScenarios/ProjectionsKillScenario.cs
  63. +3 −3 src/EventStore/EventStore.TestClient/Commands/RunTestScenarios/ScenarioBase.cs
  64. +3 −0 src/EventStore/EventStore.TestClient/Commands/RunTestScenarios/TestEvent.cs
  65. +1 −0 src/EventStore/EventStore.TestClient/Commands/TransactionWriteProcessor.cs
  66. +1 −0 src/EventStore/EventStore.TestClient/Commands/WriteFloodHttpProcessor.cs
  67. +1 −0 src/EventStore/EventStore.TestClient/Commands/WriteFloodProcessor.cs
  68. +1 −0 src/EventStore/EventStore.TestClient/Commands/WriteFloodWaitingHttpProcessor.cs
  69. +1 −0 src/EventStore/EventStore.TestClient/Commands/WriteFloodWaitingProcessor.cs
  70. +1 −0 src/EventStore/EventStore.TestClient/Commands/WriteHttpProcessor.cs
  71. +149 −0 src/EventStore/EventStore.TestClient/Commands/WriteJsonProcessor.cs
  72. +1 −0 src/EventStore/EventStore.TestClient/Commands/WriteLongTermHttpProcessor.cs
  73. +1 −0 src/EventStore/EventStore.TestClient/Commands/WriteLongTermProcessor.cs
  74. +1 −0 src/EventStore/EventStore.TestClient/Commands/WriteProcessor.cs
  75. +1 −0 src/EventStore/EventStore.TestClient/EventStore.TestClient.csproj
  76. +1 −1 src/EventStore/EventStore.TestClient/MessageUtil.cs
  77. +1 −0 src/EventStore/EventStore.Transport.Http/ContentType.cs
  78. +1 −1 src/EventStore/EventStore.Transport.Http/EntityManagement/HttpEntity.cs
  79. +34 −21 src/EventStore/EventStore.Transport.Http/EntityManagement/HttpEntityManager.cs
  80. +3 −3 src/EventStore/EventStore.Transport.Http/EntityManagement/ManagerOperationState.cs
  81. +4 −2 src/EventStore/Protos/ClientAPI/ClientMessageDtos.proto
@@ -87,7 +87,7 @@ public TcpPackage CreateNetworkPackage()
{
lock (_corrIdLock)
{
- var dtos = _events.Select(x => new ClientMessage.ClientEvent(x.EventId.ToByteArray(), x.Type, x.Data, x.Metadata)).ToArray();
+ var dtos = _events.Select(x => new ClientMessage.ClientEvent(x.EventId.ToByteArray(), x.Type, x.IsJson, x.Data, x.Metadata)).ToArray();
var write = new ClientMessage.WriteEvents(_stream, _expectedVersion, dtos, _forward);
return new TcpPackage(TcpCommand.WriteEvents, _correlationId, write.Serialize());
}
@@ -47,6 +47,7 @@ internal class CreateStreamOperation : IClientOperation
private readonly bool _forward;
private readonly string _stream;
+ private readonly bool _isJson;
private readonly byte[] _metadata;
public Guid CorrelationId
@@ -62,13 +63,15 @@ public Guid CorrelationId
Guid correlationId,
bool forward,
string stream,
+ bool isJson,
byte[] metadata)
{
_source = source;
_correlationId = correlationId;
_forward = forward;
_stream = stream;
+ _isJson = isJson;
_metadata = metadata;
}
@@ -82,7 +85,7 @@ public TcpPackage CreateNetworkPackage()
{
lock (_corrIdLock)
{
- var dto = new ClientMessage.CreateStream(_stream, _metadata, _forward);
+ var dto = new ClientMessage.CreateStream(_stream, _metadata, _forward, _isJson);
return new TcpPackage(TcpCommand.CreateStream, _correlationId, dto.Serialize());
}
}
@@ -87,7 +87,7 @@ public TcpPackage CreateNetworkPackage()
{
lock (_corrIdLock)
{
- var dtos = _events.Select(x => new ClientMessage.ClientEvent(x.EventId.ToByteArray(), x.Type, x.Data, x.Metadata)).ToArray();
+ var dtos = _events.Select(x => new ClientMessage.ClientEvent(x.EventId.ToByteArray(), x.Type, x.IsJson, x.Data, x.Metadata)).ToArray();
var write = new ClientMessage.TransactionWrite(_transactionId, _stream, dtos, _forward);
return new TcpPackage(TcpCommand.TransactionWrite, _corrId, write.Serialize());
}
@@ -230,22 +230,22 @@ void IDisposable.Dispose()
Close();
}
- public void CreateStream(string stream, byte[] metadata)
+ public void CreateStream(string stream, bool isJson, byte[] metadata)
{
Ensure.NotNullOrEmpty(stream, "stream");
EnsureActive();
- var task = CreateStreamAsync(stream, metadata);
+ var task = CreateStreamAsync(stream, isJson, metadata);
task.Wait();
}
- public Task CreateStreamAsync(string stream, byte[] metadata)
+ public Task CreateStreamAsync(string stream, bool isJson, byte[] metadata)
{
Ensure.NotNullOrEmpty(stream, "stream");
EnsureActive();
var source = new TaskCompletionSource<object>();
- var operation = new CreateStreamOperation(source, Guid.NewGuid(), _allowForwarding, stream, metadata);
+ var operation = new CreateStreamOperation(source, Guid.NewGuid(), _allowForwarding, stream, isJson, metadata);
EnqueueOperation(operation);
return source.Task;
@@ -33,6 +33,7 @@ public interface IEvent
{
Guid EventId { get; }
string Type { get; }
+ bool IsJson { get; }
byte[] Data { get; }
byte[] Metadata { get; }
@@ -44,18 +44,22 @@ public partial class ClientEvent
[ProtoMember(2, IsRequired = false, Name=@"event_type", DataFormat = DataFormat.Default)]
public readonly string EventType;
- [ProtoMember(3, IsRequired = true, Name=@"data", DataFormat = DataFormat.Default)]
+ [ProtoMember(3, IsRequired = true, Name=@"is_json", DataFormat = DataFormat.Default)]
+ public readonly bool IsJson;
+
+ [ProtoMember(4, IsRequired = true, Name=@"data", DataFormat = DataFormat.Default)]
public readonly byte[] Data;
- [ProtoMember(4, IsRequired = false, Name=@"metadata", DataFormat = DataFormat.Default)]
+ [ProtoMember(5, IsRequired = false, Name=@"metadata", DataFormat = DataFormat.Default)]
public readonly byte[] Metadata;
private ClientEvent() {}
- public ClientEvent(byte[] eventId, string eventType, byte[] data, byte[] metadata)
+ public ClientEvent(byte[] eventId, string eventType, bool isJson, byte[] data, byte[] metadata)
{
EventId = eventId;
EventType = eventType;
+ IsJson = isJson;
Data = data;
Metadata = metadata;
}
@@ -132,14 +136,18 @@ public partial class CreateStream
[ProtoMember(3, IsRequired = true, Name=@"allow_forwarding", DataFormat = DataFormat.Default)]
public readonly bool AllowForwarding;
+
+ [ProtoMember(4, IsRequired = true, Name = @"is_json", DataFormat = DataFormat.Default)]
+ public readonly bool IsJson;
private CreateStream() {}
-
- public CreateStream(string eventStreamId, byte[] metadata, bool allowForwarding)
+
+ public CreateStream(string eventStreamId, byte[] metadata, bool allowForwarding, bool isJson)
{
EventStreamId = eventStreamId;
Metadata = metadata;
AllowForwarding = allowForwarding;
+ IsJson = isJson;
}
}
@@ -40,7 +40,7 @@ internal class read_all_events_backward_should
[SetUp]
public void SetUp()
{
- Node = MiniNode.Create(8111, 9111);
+ Node = MiniNode.Create(40111, 40112);
Node.Start();
}
@@ -57,7 +57,7 @@ public void return_empty_slice_if_asked_to_read_from_start()
using (var store = EventStoreConnection.Create())
{
store.Connect(Node.TcpEndPoint);
- var create = store.CreateStreamAsync(stream, new byte[0]);
+ var create = store.CreateStreamAsync(stream, false, new byte[0]);
Assert.DoesNotThrow(create.Wait);
var read = store.ReadAllEventsBackwardAsync(Position.Start, 1);
@@ -94,7 +94,7 @@ public void return_partial_slice_if_not_enough_events()
using (var store = EventStoreConnection.Create())
{
store.Connect(Node.TcpEndPoint);
- var create = store.CreateStreamAsync(stream, new byte[0]);
+ var create = store.CreateStreamAsync(stream, false, new byte[0]);
Assert.DoesNotThrow(create.Wait);
var testEvents = Enumerable.Range(0, 20).Select(x => new TestEvent((x + 1).ToString())).ToArray();
@@ -118,7 +118,7 @@ public void return_events_in_reversed_order_compared_to_written()
store.Connect(Node.TcpEndPoint);
var testEvents = Enumerable.Range(0, 5).Select(x => new TestEvent((x + 1).ToString())).ToArray();
- var create = store.CreateStreamAsync(stream, new byte[0]);
+ var create = store.CreateStreamAsync(stream, false, new byte[0]);
Assert.DoesNotThrow(create.Wait);
var write = store.AppendToStreamAsync(stream, ExpectedVersion.EmptyStream, testEvents);
@@ -138,10 +138,10 @@ public void read_stream_created_events_as_well()
using (var store = EventStoreConnection.Create())
{
store.Connect(Node.TcpEndPoint);
- var create1 = store.CreateStreamAsync(stream + 1, new byte[0]);
+ var create1 = store.CreateStreamAsync(stream + 1, false, new byte[0]);
Assert.DoesNotThrow(create1.Wait);
- var create2 = store.CreateStreamAsync(stream + 2, new byte[0]);
+ var create2 = store.CreateStreamAsync(stream + 2, false, new byte[0]);
Assert.DoesNotThrow(create2.Wait);
var read = store.ReadAllEventsBackwardAsync(Position.End, 2);
@@ -159,7 +159,7 @@ public void be_able_to_read_all_one_by_one_and_return_empty_slice_at_last()
using (var store = EventStoreConnection.Create())
{
store.Connect(Node.TcpEndPoint);
- var create = store.CreateStreamAsync(stream, new byte[0]);
+ var create = store.CreateStreamAsync(stream, false, new byte[0]);
Assert.DoesNotThrow(create.Wait);
var testEvents = Enumerable.Range(0, 5).Select(x => new TestEvent((x + 1).ToString())).ToArray();
@@ -188,7 +188,7 @@ public void be_able_to_read_events_slice_at_time()
using (var store = EventStoreConnection.Create())
{
store.Connect(Node.TcpEndPoint);
- var create = store.CreateStreamAsync(stream, new byte[0]);
+ var create = store.CreateStreamAsync(stream, false, new byte[0]);
Assert.DoesNotThrow(create.Wait);
var testEvents = Enumerable.Range(0, 10).Select(x => new TestEvent((x + 1).ToString())).ToArray();
@@ -217,10 +217,10 @@ public void not_return_events_from_deleted_streams()
using (var store = EventStoreConnection.Create())
{
store.Connect(Node.TcpEndPoint);
- var create1 = store.CreateStreamAsync(stream + 1, new byte[0]);
+ var create1 = store.CreateStreamAsync(stream + 1, false, new byte[0]);
Assert.DoesNotThrow(create1.Wait);
- var create2 = store.CreateStreamAsync(stream + 2, new byte[0]);
+ var create2 = store.CreateStreamAsync(stream + 2, false, new byte[0]);
Assert.DoesNotThrow(create2.Wait);
var testEvents = Enumerable.Range(0, 10).Select(x => new TestEvent((x + 1).ToString())).ToArray();
@@ -256,10 +256,10 @@ public void not_return_stream_deleted_records()
using (var store = EventStoreConnection.Create())
{
store.Connect(Node.TcpEndPoint);
- var create1 = store.CreateStreamAsync(stream + 1, new byte[0]);
+ var create1 = store.CreateStreamAsync(stream + 1, false, new byte[0]);
Assert.DoesNotThrow(create1.Wait);
- var create2 = store.CreateStreamAsync(stream + 2, new byte[0]);
+ var create2 = store.CreateStreamAsync(stream + 2, false, new byte[0]);
Assert.DoesNotThrow(create2.Wait);
var delete1 = store.DeleteStreamAsync(stream + 1, ExpectedVersion.EmptyStream);
@@ -280,7 +280,7 @@ public void return_no_records_if_stream_created_than_deleted()
using (var store = EventStoreConnection.Create())
{
store.Connect(Node.TcpEndPoint);
- var create = store.CreateStreamAsync(stream, new byte[0]);
+ var create = store.CreateStreamAsync(stream, false, new byte[0]);
Assert.DoesNotThrow(create.Wait);
var delete = store.DeleteStreamAsync(stream, ExpectedVersion.EmptyStream);
@@ -43,7 +43,7 @@ internal class read_all_events_forward_should
[SetUp]
public void SetUp()
{
- Node = MiniNode.Create(8111, 9111);
+ Node = MiniNode.Create(40111, 40112);
Node.Start();
}
@@ -60,7 +60,7 @@ public void return_empty_slice_if_asked_to_read_from_end()
using (var store = EventStoreConnection.Create())
{
store.Connect(Node.TcpEndPoint);
- var create = store.CreateStreamAsync(stream, new byte[0]);
+ var create = store.CreateStreamAsync(stream, false, new byte[0]);
Assert.DoesNotThrow(create.Wait);
var testEvents = Enumerable.Range(0, 5).Select(x => new TestEvent((x + 1).ToString())).ToArray();
@@ -104,13 +104,13 @@ public void return_events_in_same_order_as_written()
store.Connect(Node.TcpEndPoint);
var testEvents = Enumerable.Range(0, 5).Select(x => new TestEvent((x + 1).ToString())).ToArray();
- var create1 = store.CreateStreamAsync(stream + 1, new byte[0]);
+ var create1 = store.CreateStreamAsync(stream + 1, false, new byte[0]);
Assert.DoesNotThrow(create1.Wait);
var write5to1 = store.AppendToStreamAsync(stream + 1, ExpectedVersion.EmptyStream, testEvents);
Assert.DoesNotThrow(write5to1.Wait);
- var create2 = store.CreateStreamAsync(stream + 2, new byte[0]);
+ var create2 = store.CreateStreamAsync(stream + 2, false, new byte[0]);
Assert.DoesNotThrow(create2.Wait);
var write5to2 = store.AppendToStreamAsync(stream + 2, ExpectedVersion.EmptyStream, testEvents);
@@ -131,10 +131,10 @@ public void read_stream_created_events_as_well()
using (var store = EventStoreConnection.Create())
{
store.Connect(Node.TcpEndPoint);
- var create1 = store.CreateStreamAsync(stream + 1, new byte[0]);
+ var create1 = store.CreateStreamAsync(stream + 1, false, new byte[0]);
Assert.DoesNotThrow(create1.Wait);
- var create2 = store.CreateStreamAsync(stream + 2, new byte[0]);
+ var create2 = store.CreateStreamAsync(stream + 2, false, new byte[0]);
Assert.DoesNotThrow(create2.Wait);
var read = store.ReadAllEventsForwardAsync(Position.Start, 2);
@@ -152,7 +152,7 @@ public void be_able_to_read_all_one_by_one_and_return_empty_slice_at_last()
using (var store = EventStoreConnection.Create())
{
store.Connect(Node.TcpEndPoint);
- var create = store.CreateStreamAsync(stream, new byte[0]);
+ var create = store.CreateStreamAsync(stream, false, new byte[0]);
Assert.DoesNotThrow(create.Wait);
var testEvents = Enumerable.Range(0, 5).Select(x => new TestEvent((x + 1).ToString())).ToArray();
@@ -181,7 +181,7 @@ public void be_able_to_read_events_slice_at_time()
using (var store = EventStoreConnection.Create())
{
store.Connect(Node.TcpEndPoint);
- var create = store.CreateStreamAsync(stream, new byte[0]);
+ var create = store.CreateStreamAsync(stream, false, new byte[0]);
Assert.DoesNotThrow(create.Wait);
var testEvents = Enumerable.Range(0, 20).Select(x => new TestEvent((x + 1).ToString())).ToArray();
@@ -210,7 +210,7 @@ public void return_partial_slice_if_not_enough_events()
using (var store = EventStoreConnection.Create())
{
store.Connect(Node.TcpEndPoint);
- var create = store.CreateStreamAsync(stream, new byte[0]);
+ var create = store.CreateStreamAsync(stream, false, new byte[0]);
Assert.DoesNotThrow(create.Wait);
var testEvents = Enumerable.Range(0, 20).Select(x => new TestEvent((x + 1).ToString())).ToArray();
@@ -232,10 +232,10 @@ public void not_return_events_from_deleted_streams()
using (var store = EventStoreConnection.Create())
{
store.Connect(Node.TcpEndPoint);
- var create1 = store.CreateStreamAsync(stream + 1, new byte[0]);
+ var create1 = store.CreateStreamAsync(stream + 1, false, new byte[0]);
Assert.DoesNotThrow(create1.Wait);
- var create2 = store.CreateStreamAsync(stream + 2, new byte[0]);
+ var create2 = store.CreateStreamAsync(stream + 2, false, new byte[0]);
Assert.DoesNotThrow(create2.Wait);
var testEvents = Enumerable.Range(0, 10).Select(x => new TestEvent((x + 1).ToString())).ToArray();
@@ -271,10 +271,10 @@ public void not_return_stream_deleted_records()
using (var store = EventStoreConnection.Create())
{
store.Connect(Node.TcpEndPoint);
- var create1 = store.CreateStreamAsync(stream + 1, new byte[0]);
+ var create1 = store.CreateStreamAsync(stream + 1, false, new byte[0]);
Assert.DoesNotThrow(create1.Wait);
- var create2 = store.CreateStreamAsync(stream + 2, new byte[0]);
+ var create2 = store.CreateStreamAsync(stream + 2, false, new byte[0]);
Assert.DoesNotThrow(create2.Wait);
var delete1 = store.DeleteStreamAsync(stream + 1, ExpectedVersion.EmptyStream);
@@ -295,10 +295,10 @@ public void return_no_records_if_stream_created_than_deleted()
using (var store = EventStoreConnection.Create())
{
store.Connect(Node.TcpEndPoint);
- var create1 = store.CreateStreamAsync(stream + 1, new byte[0]);
+ var create1 = store.CreateStreamAsync(stream + 1, false, new byte[0]);
Assert.DoesNotThrow(create1.Wait);
- var create2 = store.CreateStreamAsync(stream + 2, new byte[0]);
+ var create2 = store.CreateStreamAsync(stream + 2, false, new byte[0]);
Assert.DoesNotThrow(create2.Wait);
var delete1 = store.DeleteStreamAsync(stream + 1, ExpectedVersion.EmptyStream);
@@ -326,7 +326,7 @@ public void recover_from_dropped_subscription_state_using_last_known_position()
Position lastKnonwPosition = null;
var dropped = new AutoResetEvent(false);
- var create = store.CreateStreamAsync(stream, new byte[0]);
+ var create = store.CreateStreamAsync(stream, false, new byte[0]);
Assert.DoesNotThrow(create.Wait);
store.SubscribeAsync(stream,
@@ -41,7 +41,7 @@ internal class subscribe_to_all_should
[SetUp]
public void SetUp()
{
- Node = MiniNode.Create(8111, 9111);
+ Node = MiniNode.Create(40111, 40112);
Node.Start();
}
@@ -67,7 +67,7 @@ public void allow_multiple_subscriptions()
store.SubscribeToAllStreamsAsync(eventAppeared, subscriptionDropped);
store.SubscribeToAllStreamsAsync(eventAppeared, subscriptionDropped);
- var create = store.CreateStreamAsync(stream, new byte[0]);
+ var create = store.CreateStreamAsync(stream, false, new byte[0]);
Assert.That(create.Wait(Timeout));
Assert.That(appeared.Wait(Timeout));
@@ -109,7 +109,7 @@ public void catch_created_and_deleted_events_as_well()
store.SubscribeToAllStreamsAsync(eventAppeared, subscriptionDropped);
- var create = store.CreateStreamAsync(stream, new byte[0]);
+ var create = store.CreateStreamAsync(stream, false, new byte[0]);
Assert.That(create.Wait(Timeout));
var delete = store.DeleteStreamAsync(stream, ExpectedVersion.EmptyStream);
Assert.That(delete.Wait(Timeout));
@@ -77,7 +77,7 @@ public static MiniNode Create(int externalTcpPort, int externalHttpPort)
return new MiniNode(externalTcpPort, externalHttpPort);
}
- private MiniNode(int externalTcpPort = 4222, int externalHttpPort = 5222)
+ private MiniNode(int externalTcpPort = 41111, int externalHttpPort = 41112)
{
_oneTimeDbPath = Path.Combine(Path.GetTempPath(), string.Format("mini-node-one-time-db-{0}-{1}", externalTcpPort, externalHttpPort));
TryDeleteDirectory(_oneTimeDbPath);
Oops, something went wrong.

0 comments on commit 944a58d

Please sign in to comment.