Test-​Service​Fabric​Service

Validates the health and availability of a Service Fabric service.

Syntax

Test-ServiceFabricService
    [-ServiceName] <Uri>
    [-MaxStabilizationTimeoutSec] <Int32>
    [-TimeoutSec <Int32>]
    [<CommonParameters>]

Description

The Test-ServiceFabricService cmdlet validates the availability and health of the specified Service Fabric service. This cmdlet verifies that the service is at the target replica set size and that the service is healthy. This cmdlet also validates that all replicas belonging to the service are ready and not in an transitional state like InBuild (ServiceReplicaStatus). Use this cmdlet to verify that your service is stable after inducing any fault into the system.

Before you perform any operation on a Service Fabric cluster, establish a connection to the cluster by using the Connect-ServiceFabricCluster cmdlet.

Examples

Example 1: Test a service

PS C:\> Test-ServiceFabricService -ServiceName fabric:/SvcName -MaxStabilizationTimeoutSec 240

This command tests the specified service to make sure that it is stable within 240 seconds.

Required Parameters

-MaxStabilizationTimeoutSec

Specifies the maximum time-out period, in seconds, for the cluster to stabilize before failing the validate command.

Type:Int32
Position:2
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-ServiceName

Specifies the name of the service to validate.

Type:Uri
Position:1
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False

Optional Parameters

-TimeoutSec

Specifies the time-out period, in seconds, for the operation.

Type:Int32
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

Inputs

System.Uri

Represents the name of a Service Fabric service.

Outputs

System.Object

This cmdlet returns a String object that represents the status of validation.