# MembershipTableTestFixture Methods

[Type overview](/orleans/docs/api/csharp/microsoft.orleans.clustering.testkit/orleans.clustering.testkit.membershiptabletestfixture/)

## CreateAdditionalHandleAsync(string, CancellationToken) {#createadditionalhandleasync-string-system-threading-cancellationtoken-62571ac8}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.clustering.testkit/orleans.clustering.testkit.membershiptabletestfixture/methods/createadditionalhandleasync-string-system-threading-cancellationtoken-62571ac8/)

[Source](https://github.com/dotnet/orleans/blob/8bc9fd244427351ad24ccc039a9e7642a42c1cc4/src/Orleans.Clustering.TestKit/MembershipTableTestFixture.cs#L179-L196)

```csharp
public ValueTask<MembershipTableTestHandle> CreateAdditionalHandleAsync(string clusterId, CancellationToken cancellationToken = default(CancellationToken))
```

Acquires another handle in one of this fixture's owned scopes. Initialization is explicit.

### Parameters

- `clusterId` (`string`)
- `cancellationToken` (`CancellationToken`)

## DisposeAsync {#disposeasync-4e3e51ad}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.clustering.testkit/orleans.clustering.testkit.membershiptabletestfixture/methods/disposeasync-4e3e51ad/)

[Source](https://github.com/dotnet/orleans/blob/8bc9fd244427351ad24ccc039a9e7642a42c1cc4/src/Orleans.Clustering.TestKit/MembershipTableTestFixture.cs#L399)

```csharp
public ValueTask DisposeAsync()
```

Waits up to 30 seconds for cleanup. Owners remain alive until their cleanup operations complete.

## InitializeAsync(CancellationToken) {#initializeasync-system-threading-cancellationtoken-61c7634d}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.clustering.testkit/orleans.clustering.testkit.membershiptabletestfixture/methods/initializeasync-system-threading-cancellationtoken-61c7634d/)

[Source](https://github.com/dotnet/orleans/blob/8bc9fd244427351ad24ccc039a9e7642a42c1cc4/src/Orleans.Clustering.TestKit/MembershipTableTestFixture.cs#L96-L117)

```csharp
public ValueTask InitializeAsync(CancellationToken cancellationToken = default(CancellationToken))
```

Constructs and initializes the three required handles. Partial failures clean up acquired resources.

### Parameters

- `cancellationToken` (`CancellationToken`)

## RunAsync(Func&lt;MembershipTableTestFixture, CancellationToken, Task&gt;, CancellationToken) {#runasync-system-func-orleans-clustering-testkit-membershiptabletestfixture-syste-5082e477}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.clustering.testkit/orleans.clustering.testkit.membershiptabletestfixture/methods/runasync-system-func-orleans-clustering-testkit-membershiptabletestfixture-syste-5082e477/)

[Source](https://github.com/dotnet/orleans/blob/8bc9fd244427351ad24ccc039a9e7642a42c1cc4/src/Orleans.Clustering.TestKit/MembershipTableTestFixture.cs#L380-L396)

```csharp
public Task RunAsync(Func<MembershipTableTestFixture, CancellationToken, Task> action, CancellationToken cancellationToken = default(CancellationToken))
```

Runs a complete isolated case and preserves its primary failure if teardown also fails.

### Parameters

- `action` (`Func<MembershipTableTestFixture, CancellationToken, Task>`)
- `cancellationToken` (`CancellationToken`)
