Search in sources :

Example 1 with FixedDelay

use of com.azure.core.http.policy.FixedDelay in project lowkey-vault by nagyesta.

the class AbstractLowkeyVaultContainerTest method verifyConnectionIsWorking.

protected void verifyConnectionIsWorking(final String vaultUrl, final HttpClient httpClient, final TokenCredential credential) {
    final SecretClient secretClient = new SecretClientBuilder().vaultUrl(vaultUrl).credential(credential).httpClient(httpClient).serviceVersion(SecretServiceVersion.V7_2).retryPolicy(new RetryPolicy(new FixedDelay(0, Duration.ZERO))).buildClient();
    final KeyVaultSecret secret = secretClient.setSecret(NAME, VALUE);
    Assertions.assertNotNull(secret);
}
Also used : KeyVaultSecret(com.azure.security.keyvault.secrets.models.KeyVaultSecret) SecretClientBuilder(com.azure.security.keyvault.secrets.SecretClientBuilder) FixedDelay(com.azure.core.http.policy.FixedDelay) RetryPolicy(com.azure.core.http.policy.RetryPolicy) SecretClient(com.azure.security.keyvault.secrets.SecretClient)

Aggregations

FixedDelay (com.azure.core.http.policy.FixedDelay)1 RetryPolicy (com.azure.core.http.policy.RetryPolicy)1 SecretClient (com.azure.security.keyvault.secrets.SecretClient)1 SecretClientBuilder (com.azure.security.keyvault.secrets.SecretClientBuilder)1 KeyVaultSecret (com.azure.security.keyvault.secrets.models.KeyVaultSecret)1