> For the complete documentation index, see [llms.txt](https://docs.dbnl.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.dbnl.com/v0.21.x/using-distributional/python-sdk/sdk-experimental-functions/wait_for_test_generation_session.md).

# 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](/v0.21.x/using-distributional/python-sdk/sdk-objects/testgenerationsession.md) 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 |
