diff --git a/Iggy_SDK_Tests/E2ETests/Fixtures/Tcp/IggyTcpFetchMessagesFixture.cs b/Iggy_SDK_Tests/E2ETests/Fixtures/Tcp/IggyTcpFetchMessagesFixture.cs index 4e31f79..8d6ed9a 100644 --- a/Iggy_SDK_Tests/E2ETests/Fixtures/Tcp/IggyTcpFetchMessagesFixture.cs +++ b/Iggy_SDK_Tests/E2ETests/Fixtures/Tcp/IggyTcpFetchMessagesFixture.cs @@ -14,7 +14,7 @@ namespace Iggy_SDK_Tests.E2ETests.Fixtures.Tcp; public sealed class IggyTcpFetchMessagesFixture : IAsyncLifetime { - private readonly IContainer _container = new ContainerBuilder().WithImage("iggyrs/iggy:latest") + public readonly IContainer _container = new ContainerBuilder().WithImage("iggyrs/iggy:latest") //.WithPortBinding(3000, true) .WithPortBinding(8090, true) .WithWaitStrategy(Wait.ForUnixContainer().UntilPortIsAvailable(8090)) @@ -65,15 +65,17 @@ await sut.LoginUser(new LoginUserRequest var request = MessageFactory.CreateMessageSendRequest( StreamRequest.StreamId, TopicRequest.TopicId, PartitionId, - MessageFactory.GenerateMessages(20)); + MessageFactory.GenerateMessages(1000000)); var requestWithHeaders = MessageFactory.CreateMessageSendRequest( StreamRequest.StreamId, HeadersTopicRequest.TopicId, PartitionId, - MessageFactory.GenerateMessages(20, MessageFactory.GenerateMessageHeaders(6))); + MessageFactory.GenerateMessages(1000000, MessageFactory.GenerateMessageHeaders(6))); await sut.SendMessagesAsync(request); await sut.SendMessagesAsync(requestWithHeaders); await Task.Delay(1000); + var logs = await _container.GetLogsAsync(); + Console.WriteLine($"{logs.Stderr} {logs.Stdout}"); } public async Task DisposeAsync() diff --git a/Iggy_SDK_Tests/E2ETests/Fixtures/Tcp/IggyTcpPollMessagesFixture.cs b/Iggy_SDK_Tests/E2ETests/Fixtures/Tcp/IggyTcpPollMessagesFixture.cs index 5f5df7a..67731ad 100644 --- a/Iggy_SDK_Tests/E2ETests/Fixtures/Tcp/IggyTcpPollMessagesFixture.cs +++ b/Iggy_SDK_Tests/E2ETests/Fixtures/Tcp/IggyTcpPollMessagesFixture.cs @@ -16,7 +16,7 @@ namespace Iggy_SDK_Tests.E2ETests.Fixtures.Tcp; public sealed class IggyTcpPollMessagesFixture : IAsyncLifetime { - private readonly IContainer _container = new ContainerBuilder().WithImage("iggyrs/iggy:latest") + public readonly IContainer _container = new ContainerBuilder().WithImage("iggyrs/iggy:latest") //.WithPortBinding(3000, true) .WithPortBinding(8090, true) .WithWaitStrategy(Wait.ForUnixContainer().UntilPortIsAvailable(8090)) @@ -29,7 +29,7 @@ public sealed class IggyTcpPollMessagesFixture : IAsyncLifetime private static readonly StreamRequest StreamRequest = StreamFactory.CreateStreamRequest(); private static readonly TopicRequest TopicRequest = TopicFactory.CreateTopicRequest(); private static readonly TopicRequest HeadersTopicRequest = TopicFactory.CreateTopicRequest(); - public const int MessageCount = 1000; + public const int MessageCount = 1000000; public readonly int StreamId = StreamRequest.StreamId; public readonly int TopicId = TopicRequest.TopicId; @@ -82,7 +82,7 @@ await sut.SendMessagesAsync(new MessageSendRequest }, MessageFactory.Serializer, headers: MessageFactory.GenerateMessageHeaders(HeadersCount)); - //await Task.Delay(2500); + await Task.Delay(2500); } public async Task DisposeAsync() diff --git a/Iggy_SDK_Tests/E2ETests/Messaging/FetchMessagesE2ETcp.cs b/Iggy_SDK_Tests/E2ETests/Messaging/FetchMessagesE2ETcp.cs index 2f4e0f0..159b20d 100644 --- a/Iggy_SDK_Tests/E2ETests/Messaging/FetchMessagesE2ETcp.cs +++ b/Iggy_SDK_Tests/E2ETests/Messaging/FetchMessagesE2ETcp.cs @@ -40,6 +40,8 @@ public async Task PollMessagesTMessage_WithNoHeaders_Should_PollMessages_Success responseMessage.Headers.Should().BeNull(); responseMessage.State.Should().Be(MessageState.Available); } + var logs = await _fixture._container.GetLogsAsync(); + Console.WriteLine($"{logs.Stderr} {logs.Stdout}"); } [Fact, TestPriority(2)] @@ -48,6 +50,8 @@ public async Task PollMessagesTMessage_Should_Throw_InvalidResponse() await _fixture.sut.Invoking(x => x.FetchMessagesAsync(_invalidFetchRequest, MessageFactory.DeserializeDummyMessage)) .Should() .ThrowExactlyAsync(); + var logs = await _fixture._container.GetLogsAsync(); + Console.WriteLine($"{logs.Stderr} {logs.Stdout}"); } [Fact, TestPriority(3)] @@ -62,6 +66,8 @@ public async Task PollMessages_WithNoHeaders_Should_PollMessages_Successfully() responseMessage.Headers.Should().BeNull(); responseMessage.State.Should().Be(MessageState.Available); } + var logs = await _fixture._container.GetLogsAsync(); + Console.WriteLine($"{logs.Stderr} {logs.Stdout}"); } [Fact, TestPriority(4)] @@ -70,6 +76,8 @@ public async Task PollMessages_Should_Throw_InvalidResponse() await _fixture.sut.Invoking(x => x.FetchMessagesAsync(_invalidFetchRequest)) .Should() .ThrowExactlyAsync(); + var logs = await _fixture._container.GetLogsAsync(); + Console.WriteLine($"{logs.Stderr} {logs.Stdout}"); } [Fact, TestPriority(5)] @@ -85,6 +93,8 @@ public async Task PollMessages_WithHeaders_Should_PollMessages_Successfully() responseMessage.State.Should().Be(MessageState.Available); responseMessage.Headers!.Count.Should().Be(6); } + var logs = await _fixture._container.GetLogsAsync(); + Console.WriteLine($"{logs.Stderr} {logs.Stdout}"); } [Fact, TestPriority(6)] @@ -100,5 +110,7 @@ public async Task PollMessagesTMessage_WithHeaders_Should_PollMessages_Successfu responseMessage.State.Should().Be(MessageState.Available); responseMessage.Headers!.Count.Should().Be(6); } + var logs = await _fixture._container.GetLogsAsync(); + Console.WriteLine($"{logs.Stderr} {logs.Stdout}"); } } \ No newline at end of file