[#33] Client: Add extended life tests
Signed-off-by: Pavel Gross <p.gross@yadro.com>
This commit is contained in:
parent
2e56c13946
commit
bd8eb7cc60
24 changed files with 1020 additions and 976 deletions
|
@ -212,9 +212,15 @@ public class FrostFSClient : IFrostFSClient
|
|||
return GetContainerService().ListContainersAsync(args, ctx);
|
||||
}
|
||||
|
||||
[Obsolete("Use PutContainerAsync method")]
|
||||
public Task<FrostFsContainerId> CreateContainerAsync(PrmContainerCreate args, CallContext ctx)
|
||||
{
|
||||
return GetContainerService().CreateContainerAsync(args, ctx);
|
||||
return GetContainerService().PutContainerAsync(args, ctx);
|
||||
}
|
||||
|
||||
public Task<FrostFsContainerId> PutContainerAsync(PrmContainerCreate args, CallContext ctx)
|
||||
{
|
||||
return GetContainerService().PutContainerAsync(args, ctx);
|
||||
}
|
||||
|
||||
public Task DeleteContainerAsync(PrmContainerDelete args, CallContext ctx)
|
||||
|
@ -314,18 +320,6 @@ public class FrostFSClient : IFrostFSClient
|
|||
}
|
||||
#endregion
|
||||
|
||||
private async void CheckFrostFsVersionSupport(CallContext ctx)
|
||||
{
|
||||
var service = GetNetmapService();
|
||||
var localNodeInfo = await service.GetLocalNodeInfoAsync(ctx).ConfigureAwait(false);
|
||||
|
||||
if (!localNodeInfo.Version.IsSupported(ClientCtx.Version))
|
||||
{
|
||||
var msg = $"FrostFS {localNodeInfo.Version} is not supported.";
|
||||
throw new FrostFsException(msg);
|
||||
}
|
||||
}
|
||||
|
||||
private CallInvoker? CreateInvoker()
|
||||
{
|
||||
CallInvoker? callInvoker = null;
|
||||
|
@ -361,7 +355,7 @@ public class FrostFSClient : IFrostFSClient
|
|||
{
|
||||
var invoker = CreateInvoker();
|
||||
|
||||
NetmapServiceClient = NetmapServiceClient ?? (
|
||||
NetmapServiceClient ??= (
|
||||
invoker != null
|
||||
? new NetmapServiceClient(invoker)
|
||||
: new NetmapServiceClient(ClientCtx.Channel));
|
||||
|
@ -378,7 +372,7 @@ public class FrostFSClient : IFrostFSClient
|
|||
{
|
||||
var invoker = CreateInvoker();
|
||||
|
||||
SessionServiceClient = SessionServiceClient ?? (
|
||||
SessionServiceClient ??= (
|
||||
invoker != null
|
||||
? new SessionServiceClient(invoker)
|
||||
: new SessionServiceClient(ClientCtx.Channel));
|
||||
|
@ -387,7 +381,6 @@ public class FrostFSClient : IFrostFSClient
|
|||
}
|
||||
|
||||
return SessionServiceProvider;
|
||||
|
||||
}
|
||||
|
||||
private ApeManagerServiceProvider GetApeManagerService()
|
||||
|
@ -396,7 +389,7 @@ public class FrostFSClient : IFrostFSClient
|
|||
{
|
||||
var invoker = CreateInvoker();
|
||||
|
||||
ApeManagerServiceClient = ApeManagerServiceClient ?? (
|
||||
ApeManagerServiceClient ??= (
|
||||
invoker != null
|
||||
? new APEManagerServiceClient(invoker)
|
||||
: new APEManagerServiceClient(ClientCtx.Channel));
|
||||
|
@ -413,7 +406,7 @@ public class FrostFSClient : IFrostFSClient
|
|||
{
|
||||
var invoker = CreateInvoker();
|
||||
|
||||
AccountingServiceClient = AccountingServiceClient ?? (
|
||||
AccountingServiceClient ??= (
|
||||
invoker != null
|
||||
? new AccountingServiceClient(invoker)
|
||||
: new AccountingServiceClient(ClientCtx.Channel));
|
||||
|
@ -430,7 +423,7 @@ public class FrostFSClient : IFrostFSClient
|
|||
{
|
||||
var invoker = CreateInvoker();
|
||||
|
||||
ContainerServiceClient = ContainerServiceClient ?? (
|
||||
ContainerServiceClient ??= (
|
||||
invoker != null
|
||||
? new ContainerServiceClient(invoker)
|
||||
: new ContainerServiceClient(ClientCtx.Channel));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue