# wait\_for\_test\_generation\_session

```python
def wait_for_test_generation_session(
    *,
    test_generation_session: TestGenerationSession,
    timeout_s: int = 180,
) -> TestGenerationSession
```

### Parameters

| Arguments                 | Description                                                                                                                                                                                                  |
| ------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `test_generation_session` | The dbnl [TestGenerationSession](https://docs.dbnl.com/v0.19.x/using-distributional/python-sdk/sdk-objects/testgenerationsession) to wait for completion.                                                    |
| `timeout_s`               | An optional timeout (in seconds) parameter for waiting for the TestGenerationSession to complete. An exception will be raised if  the TestGenerationSession did not complete before `timeout_s` has elapsed. |

### Returns

| Type                    | Description                         |
| ----------------------- | ----------------------------------- |
| `TestGenerationSession` | The completed TestGenerationSession |
