Skip to content

Commit 5bd7ee2

Browse files
committed
Merge branch 'edlng-server-management-commands-ga' of github.com:valkey-io/valkey-glide-csharp into edlng-server-management-commands-ga
2 parents 7457ff9 + 6447301 commit 5bd7ee2

File tree

3 files changed

+20
-2
lines changed

3 files changed

+20
-2
lines changed

.github/workflows/tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ jobs:
5454
tests:
5555
name: net${{ matrix.dotnet }}, server ${{ matrix.server.version }}, ${{ matrix.host.TARGET }}
5656
needs: get-matrices
57-
timeout-minutes: 35
57+
timeout-minutes: 100
5858
strategy:
5959
fail-fast: false
6060
matrix:

tests/Valkey.Glide.IntegrationTests/DebugSleepTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ public class DebugSleepTests
1717
[Fact]
1818
public async Task ErrorIfTimedOut()
1919
{
20-
using GlideClient client = TestConfiguration.DefaultStandaloneClient();
20+
using GlideClient client = TestConfiguration.LowTimeoutStandaloneClient();
2121
_ = await Assert.ThrowsAsync<TimeoutException>(async () =>
2222
_ = await client.CustomCommand(["debug", "sleep", "0.5"])
2323
);

tests/Valkey.Glide.IntegrationTests/TestConfiguration.cs

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,17 +22,29 @@ public static StandaloneClientConfigurationBuilder DefaultClientConfig() =>
2222
new StandaloneClientConfigurationBuilder()
2323
.WithAddress(STANDALONE_HOSTS[0].host, STANDALONE_HOSTS[0].port)
2424
.WithProtocolVersion(ConnectionConfiguration.Protocol.RESP3)
25+
.WithRequestTimeout(TimeSpan.FromSeconds(60))
2526
.WithTls(TLS);
2627

2728
public static ClusterClientConfigurationBuilder DefaultClusterClientConfig() =>
2829
new ClusterClientConfigurationBuilder()
2930
.WithAddress(CLUSTER_HOSTS[0].host, CLUSTER_HOSTS[0].port)
3031
.WithProtocolVersion(ConnectionConfiguration.Protocol.RESP3)
32+
.WithRequestTimeout(TimeSpan.FromSeconds(60))
33+
.WithTls(TLS);
34+
35+
public static StandaloneClientConfigurationBuilder DefaultClientConfigLowTimeout() =>
36+
new StandaloneClientConfigurationBuilder()
37+
.WithAddress(STANDALONE_HOSTS[0].host, STANDALONE_HOSTS[0].port)
38+
.WithProtocolVersion(ConnectionConfiguration.Protocol.RESP3)
39+
.WithRequestTimeout(TimeSpan.FromMilliseconds(250))
3140
.WithTls(TLS);
3241

3342
public static GlideClient DefaultStandaloneClient()
3443
=> GlideClient.CreateClient(DefaultClientConfig().Build()).GetAwaiter().GetResult();
3544

45+
public static GlideClient LowTimeoutStandaloneClient()
46+
=> GlideClient.CreateClient(DefaultClientConfigLowTimeout().Build()).GetAwaiter().GetResult();
47+
3648
public static GlideClusterClient DefaultClusterClient()
3749
=> GlideClusterClient.CreateClient(DefaultClusterClientConfig().Build()).GetAwaiter().GetResult();
3850

@@ -64,12 +76,14 @@ public static TheoryData<GlideClient> TestStandaloneClients
6476
GlideClient resp2client = GlideClient.CreateClient(
6577
DefaultClientConfig()
6678
.WithProtocolVersion(ConnectionConfiguration.Protocol.RESP2)
79+
.WithRequestTimeout(TimeSpan.FromSeconds(60))
6780
.Build()
6881
).GetAwaiter().GetResult();
6982
resp2client.SetInfo("RESP2");
7083
GlideClient resp3client = GlideClient.CreateClient(
7184
DefaultClientConfig()
7285
.WithProtocolVersion(ConnectionConfiguration.Protocol.RESP3)
86+
.WithRequestTimeout(TimeSpan.FromSeconds(60))
7387
.Build()
7488
).GetAwaiter().GetResult();
7589
resp3client.SetInfo("RESP3");
@@ -93,12 +107,14 @@ public static TheoryData<GlideClusterClient> TestClusterClients
93107
GlideClusterClient resp2client = GlideClusterClient.CreateClient(
94108
DefaultClusterClientConfig()
95109
.WithProtocolVersion(ConnectionConfiguration.Protocol.RESP2)
110+
.WithRequestTimeout(TimeSpan.FromSeconds(60))
96111
.Build()
97112
).GetAwaiter().GetResult();
98113
resp2client.SetInfo("RESP2");
99114
GlideClusterClient resp3client = GlideClusterClient.CreateClient(
100115
DefaultClusterClientConfig()
101116
.WithProtocolVersion(ConnectionConfiguration.Protocol.RESP3)
117+
.WithRequestTimeout(TimeSpan.FromSeconds(60))
102118
.Build()
103119
).GetAwaiter().GetResult();
104120
resp3client.SetInfo("RESP3");
@@ -128,6 +144,7 @@ public static ConfigurationOptions DefaultCompatibleConfig()
128144
ConfigurationOptions config = new();
129145
config.EndPoints.Add(STANDALONE_HOSTS[0].host, STANDALONE_HOSTS[0].port);
130146
config.Ssl = TLS;
147+
config.ResponseTimeout = 60000; // ms
131148
return config;
132149
}
133150

@@ -136,6 +153,7 @@ public static ConfigurationOptions DefaultCompatibleClusterConfig()
136153
ConfigurationOptions config = new();
137154
config.EndPoints.Add(CLUSTER_HOSTS[0].host, CLUSTER_HOSTS[0].port);
138155
config.Ssl = TLS;
156+
config.ResponseTimeout = 60000; // ms
139157
return config;
140158
}
141159

0 commit comments

Comments
 (0)