-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Description
Is your feature request related to a problem? Please describe.
We are facing an issue when running tests as different users (via token authentication). The Elastic client states it should be a singleton, however, there is only one chance upon initialisation of the Elastic client to define the connection settings. This means each time we run a test we have to create a new client with a new set of connection settings for the selected user to be tested on.
Describe the solution you'd like
A nice solution would be to configure the token used for each request. Or alternatively, making the Elastic client an IDisposable type.
Describe alternatives you've considered
For now, we are running these tests synchronously and relying on the garbage collector to "dispose" of these when the test has finished.
Additional context
none