atharvalade commented on code in PR #2710:
URL: https://github.com/apache/iggy/pull/2710#discussion_r2790685791


##########
foreign/csharp/Iggy_SDK.Tests.Integration/SystemTests.cs:
##########
@@ -88,64 +93,62 @@ public async Task GetMe_Tcp_Should_Return_MyClient(Protocol 
protocol)
 
     [Test]
     [SkipTcp]
-    [DependsOn(nameof(GetClient_Should_Return_CorrectClient))]
     
[MethodDataSource<IggyServerFixture>(nameof(IggyServerFixture.ProtocolData))]
     public async Task 
GetMe_HTTP_Should_Throw_FeatureUnavailableException(Protocol protocol)
     {
-        await Should.ThrowAsync<FeatureUnavailableException>(() => 
Fixture.Clients[protocol].GetMeAsync());
+        var client = await Fixture.CreateHttpClient();
+
+        await Should.ThrowAsync<FeatureUnavailableException>(() => 
client.GetMeAsync());
     }
 
     [Test]
-    [DependsOn(nameof(GetMe_HTTP_Should_Throw_FeatureUnavailableException))]
-    [DependsOn(nameof(GetMe_Tcp_Should_Return_MyClient))]
     
[MethodDataSource<IggyServerFixture>(nameof(IggyServerFixture.ProtocolData))]
     public async Task 
GetClient_WithConsumerGroup_Should_Return_CorrectClient(Protocol protocol)
     {
-        var client = await 
Fixture.IggyServerFixture.CreateClient(Protocol.Tcp, protocol);
-        await client.LoginUser("iggy", "iggy");
-        var stream = await 
client.CreateStreamAsync(Fixture.StreamId.GetWithProtocol(protocol));
-        await 
client.CreateTopicAsync(Identifier.String(Fixture.StreamId.GetWithProtocol(protocol)),
 "test_topic", 2);
-
-        var consumerGroup
-            = await 
client.CreateConsumerGroupAsync(Identifier.String(Fixture.StreamId.GetWithProtocol(protocol)),
-                Identifier.String("test_topic"), "test_consumer_group");
-        await 
client.JoinConsumerGroupAsync(Identifier.String(Fixture.StreamId.GetWithProtocol(protocol)),
+        var client = protocol == Protocol.Tcp
+            ? await Fixture.CreateTcpClient()
+            : await Fixture.CreateHttpClient();
+
+        var streamName = $"sys-cg-{Guid.NewGuid():N}";
+        var tcpClient = await Fixture.CreateClient(Protocol.Tcp);
+        await tcpClient.LoginUser("iggy", "iggy");
+
+        var stream = await tcpClient.CreateStreamAsync(streamName);
+        await tcpClient.CreateTopicAsync(Identifier.String(streamName), 
"test_topic", 2);
+
+        var consumerGroup = await tcpClient.CreateConsumerGroupAsync(
+            Identifier.String(streamName), Identifier.String("test_topic"), 
"test_consumer_group");
+        await tcpClient.JoinConsumerGroupAsync(Identifier.String(streamName),
             Identifier.String("test_topic"), 
Identifier.String("test_consumer_group"));
-        var me = await client.GetMeAsync();
+        var me = await tcpClient.GetMeAsync();
 
-        var response = await 
Fixture.Clients[protocol].GetClientByIdAsync(me!.ClientId);
+        var response = await client.GetClientByIdAsync(me!.ClientId);
         response.ShouldNotBeNull();
-        response.UserId.ShouldBe(0u);
         response.Address.ShouldNotBeNullOrEmpty();
         response.Transport.ShouldBe(Protocol.Tcp);
         response.ConsumerGroupsCount.ShouldBe(1);
         response.ConsumerGroups.ShouldNotBeEmpty();
         response.ConsumerGroups.ShouldContain(x => x.GroupId == 
consumerGroup!.Id);
-        response.ConsumerGroups.ShouldContain(x => x.TopicId == 0);

Review Comment:
   Done. `SystemTests.GetClient_WithConsumerGroup` now creates "`first_topic`" 
and "`second_topic`", uses the second topic for the consumer group, and 
`asserts x.TopicId == (int)secondTopic!.Id`



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to