Skip to content

Commit

Permalink
remove unused variable
Browse files Browse the repository at this point in the history
  • Loading branch information
XmasApple committed Oct 19, 2023
1 parent e3b3199 commit 0973b57
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions src/Ydb.Sdk/tests/Table/TestGracefulShutdown.cs
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Logging.Abstractions;
using Xunit;
using Xunit.Abstractions;
using Ydb.Sdk.Services.Table;

namespace Ydb.Sdk.Tests.Table;

[Trait("Category", "Integration")]
public class TestGracefulShutdown
{
private readonly ITestOutputHelper _testOutputHelper;
private readonly ILoggerFactory _loggerFactory;

private readonly DriverConfig _driverConfig = new(
Expand All @@ -19,9 +17,8 @@ public class TestGracefulShutdown

private const string ShutdownUrl = "http://localhost:8765/actors/kqp_proxy?force_shutdown=all";

public TestGracefulShutdown(ITestOutputHelper testOutputHelper)
public TestGracefulShutdown()
{
_testOutputHelper = testOutputHelper;
_loggerFactory = Utils.GetLoggerFactory() ?? NullLoggerFactory.Instance;
}

Expand Down Expand Up @@ -56,7 +53,7 @@ await tableClient.SessionExec(
// _testOutputHelper.WriteLine(session2);
await Task.Delay(1000);


// control check
Assert.NotEqual("", session1);
Assert.Equal(session1, session2);
Expand All @@ -65,7 +62,7 @@ await tableClient.SessionExec(
using var httpClient = new HttpClient();
await httpClient.GetAsync(ShutdownUrl);
await Task.Delay(1000);

// new session
var session3 = "";
await tableClient.SessionExec(
Expand All @@ -75,9 +72,9 @@ await tableClient.SessionExec(
return await session.ExecuteDataQuery("SELECT 1", TxControl.BeginSerializableRW().Commit());
}
);

Assert.Equal(session2, session3);

var session4 = "";
await tableClient.SessionExec(
async session =>
Expand All @@ -86,7 +83,7 @@ await tableClient.SessionExec(
return await session.ExecuteDataQuery("SELECT 1", TxControl.BeginSerializableRW().Commit());
}
);

Assert.NotEqual("", session3);
Assert.NotEqual(session3, session4);
}
Expand Down

0 comments on commit 0973b57

Please sign in to comment.