Skip to content

Commit

Permalink
fixup test
Browse files Browse the repository at this point in the history
  • Loading branch information
mgravell committed Feb 28, 2024
1 parent bb22241 commit ebf604b
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion tests/StackExchange.Redis.Tests/ConfigTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -285,8 +285,15 @@ public async Task ClientLibraryName()
using var conn = Create(allowAdmin: true, shared: false);
var server = GetAnyPrimary(conn);

long id = conn.GetConnectionId(server.EndPoint, ConnectionType.Interactive)!.Value;
await server.PingAsync();
var possibleId = conn.GetConnectionId(server.EndPoint, ConnectionType.Interactive);

if (possibleId is null)
{
Log("(client id not available)");
return;
}
var id = possibleId.Value;
var libName = server.ClientList().Single(x => x.Id == id).LibraryName;
if (libName is not null) // server-version dependent
{
Expand Down

0 comments on commit ebf604b

Please sign in to comment.