azure-docs-sdk-java/docs-ref-autogen/com.azure.core.test.TestBas...

303 строки
24 KiB
YAML

### YamlMime:JavaType
uid: "com.azure.core.test.TestBase"
fullName: "com.azure.core.test.TestBase"
name: "TestBase"
nameWithType: "TestBase"
summary: "Base class for running live and playback tests using <xref uid=\"com.azure.core.test.InterceptorManager\" data-throw-if-not-resolved=\"false\" data-raw-source=\"InterceptorManager\"></xref>."
inheritances:
- "<xref href=\"java.lang.Object?displayProperty=fullName\" data-throw-if-not-resolved=\"False\" />"
inheritedClassMethods:
- classRef: "java.lang.<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html\">Object</a>"
methodsRef:
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#clone--\">clone</a>"
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#equals-java.lang.Object-\">equals</a>"
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#finalize--\">finalize</a>"
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#getClass--\">getClass</a>"
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#hashCode--\">hashCode</a>"
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#notify--\">notify</a>"
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#notifyAll--\">notifyAll</a>"
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#toString--\">toString</a>"
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait--\">wait</a>"
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait-long-\">wait</a>"
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait-long-int-\">wait</a>"
syntax: "public abstract class **TestBase**"
constructors:
- uid: "com.azure.core.test.TestBase.TestBase()"
fullName: "com.azure.core.test.TestBase.TestBase()"
name: "TestBase()"
nameWithType: "TestBase.TestBase()"
summary: "Creates a new instance of <xref uid=\"com.azure.core.test.TestBase\" data-throw-if-not-resolved=\"false\" data-raw-source=\"TestBase\"></xref>."
syntax: "public TestBase()"
desc: "Creates a new instance of <xref uid=\"com.azure.core.test.TestBase\" data-throw-if-not-resolved=\"false\" data-raw-source=\"TestBase\"></xref>."
fields:
- uid: "com.azure.core.test.TestBase.AZURE_TEST_HTTP_CLIENTS_VALUE_ALL"
fullName: "com.azure.core.test.TestBase.AZURE_TEST_HTTP_CLIENTS_VALUE_ALL"
name: "AZURE_TEST_HTTP_CLIENTS_VALUE_ALL"
nameWithType: "TestBase.AZURE_TEST_HTTP_CLIENTS_VALUE_ALL"
summary: "Specifies to use all Http<wbr>Client implementations in testing."
modifiers:
- "static"
- "final"
field:
value: "ALL"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
syntax: "public static final String AZURE_TEST_HTTP_CLIENTS_VALUE_ALL"
desc: "Specifies to use all HttpClient implementations in testing."
- uid: "com.azure.core.test.TestBase.AZURE_TEST_HTTP_CLIENTS_VALUE_NETTY"
fullName: "com.azure.core.test.TestBase.AZURE_TEST_HTTP_CLIENTS_VALUE_NETTY"
name: "AZURE_TEST_HTTP_CLIENTS_VALUE_NETTY"
nameWithType: "TestBase.AZURE_TEST_HTTP_CLIENTS_VALUE_NETTY"
summary: "Specifies to use Netty Http<wbr>Client implementation in testing."
modifiers:
- "static"
- "final"
field:
value: "NettyAsyncHttpClient"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
syntax: "public static final String AZURE_TEST_HTTP_CLIENTS_VALUE_NETTY"
desc: "Specifies to use Netty HttpClient implementation in testing."
- uid: "com.azure.core.test.TestBase.AZURE_TEST_SERVICE_VERSIONS_VALUE_ALL"
fullName: "com.azure.core.test.TestBase.AZURE_TEST_SERVICE_VERSIONS_VALUE_ALL"
name: "AZURE_TEST_SERVICE_VERSIONS_VALUE_ALL"
nameWithType: "TestBase.AZURE_TEST_SERVICE_VERSIONS_VALUE_ALL"
summary: "Specifies to use all service versions in testing."
modifiers:
- "static"
- "final"
field:
value: "ALL"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
syntax: "public static final String AZURE_TEST_SERVICE_VERSIONS_VALUE_ALL"
desc: "Specifies to use all service versions in testing."
- uid: "com.azure.core.test.TestBase.interceptorManager"
fullName: "com.azure.core.test.TestBase.interceptorManager"
name: "interceptorManager"
nameWithType: "TestBase.interceptorManager"
summary: "<xref uid=\"com.azure.core.test.InterceptorManager\" data-throw-if-not-resolved=\"false\" data-raw-source=\"InterceptorManager\"></xref> used for this test run."
modifiers:
- "protected"
field:
type: "<xref href=\"com.azure.core.test.InterceptorManager?alt=com.azure.core.test.InterceptorManager&text=InterceptorManager\" data-throw-if-not-resolved=\"False\" />"
syntax: "protected InterceptorManager interceptorManager"
desc: "<xref uid=\"com.azure.core.test.InterceptorManager\" data-throw-if-not-resolved=\"false\" data-raw-source=\"InterceptorManager\"></xref> used for this test run."
- uid: "com.azure.core.test.TestBase.testContextManager"
fullName: "com.azure.core.test.TestBase.testContextManager"
name: "testContextManager"
nameWithType: "TestBase.testContextManager"
summary: "<xref uid=\"com.azure.core.test.TestContextManager\" data-throw-if-not-resolved=\"false\" data-raw-source=\"TestContextManager\"></xref> used for this test run."
modifiers:
- "protected"
field:
type: "<xref href=\"com.azure.core.test.TestContextManager?alt=com.azure.core.test.TestContextManager&text=TestContextManager\" data-throw-if-not-resolved=\"False\" />"
syntax: "protected TestContextManager testContextManager"
desc: "<xref uid=\"com.azure.core.test.TestContextManager\" data-throw-if-not-resolved=\"false\" data-raw-source=\"TestContextManager\"></xref> used for this test run."
- uid: "com.azure.core.test.TestBase.testResourceNamer"
fullName: "com.azure.core.test.TestBase.testResourceNamer"
name: "testResourceNamer"
nameWithType: "TestBase.testResourceNamer"
summary: "<xref uid=\"com.azure.core.test.utils.TestResourceNamer\" data-throw-if-not-resolved=\"false\" data-raw-source=\"TestResourceNamer\"></xref> used for this test run."
modifiers:
- "protected"
field:
type: "<xref href=\"com.azure.core.test.utils.TestResourceNamer?alt=com.azure.core.test.utils.TestResourceNamer&text=TestResourceNamer\" data-throw-if-not-resolved=\"False\" />"
syntax: "protected TestResourceNamer testResourceNamer"
desc: "<xref uid=\"com.azure.core.test.utils.TestResourceNamer\" data-throw-if-not-resolved=\"false\" data-raw-source=\"TestResourceNamer\"></xref> used for this test run."
methods:
- uid: "com.azure.core.test.TestBase.<T,U>setPlaybackPollerFluxPollInterval(com.azure.core.util.polling.PollerFlux<T,U>)"
fullName: "com.azure.core.test.TestBase.<T,U>setPlaybackPollerFluxPollInterval(PollerFlux<T,U> pollerFlux)"
name: "<T,U>setPlaybackPollerFluxPollInterval(PollerFlux<T,U> pollerFlux)"
nameWithType: "TestBase.<T,U>setPlaybackPollerFluxPollInterval(PollerFlux<T,U> pollerFlux)"
summary: "Sets the polling interval for the passed <xref uid=\"com.azure.core.util.polling.PollerFlux\" data-throw-if-not-resolved=\"false\" data-raw-source=\"PollerFlux\"></xref>."
modifiers:
- "protected"
parameters:
- description: "The <xref uid=\"com.azure.core.util.polling.PollerFlux\" data-throw-if-not-resolved=\"false\" data-raw-source=\"PollerFlux\"></xref>."
name: "pollerFlux"
type: "<xref href=\"com.azure.core.util.polling.PollerFlux?alt=com.azure.core.util.polling.PollerFlux&text=PollerFlux\" data-throw-if-not-resolved=\"False\" />&lt;<xref href=\"T?alt=T&text=T\" data-throw-if-not-resolved=\"False\" />,<xref href=\"U?alt=U&text=U\" data-throw-if-not-resolved=\"False\" />&gt;"
syntax: "protected PollerFlux<T,U> <T,U>setPlaybackPollerFluxPollInterval(PollerFlux<T,U> pollerFlux)"
desc: "Sets the polling interval for the passed <xref uid=\"com.azure.core.util.polling.PollerFlux\" data-throw-if-not-resolved=\"false\" data-raw-source=\"PollerFlux\"></xref>.\n\nThis configures the <xref uid=\"com.azure.core.util.polling.PollerFlux\" data-throw-if-not-resolved=\"false\" data-raw-source=\"PollerFlux\"></xref> to use a poll interval of one millisecond if the test mode is playback. In live or record test mode the polling interval is left as-is."
returns:
description: "The updated <xref uid=\"com.azure.core.util.polling.PollerFlux\" data-throw-if-not-resolved=\"false\" data-raw-source=\"PollerFlux\"></xref>."
type: "<xref href=\"com.azure.core.util.polling.PollerFlux?alt=com.azure.core.util.polling.PollerFlux&text=PollerFlux\" data-throw-if-not-resolved=\"False\" />&lt;<xref href=\"T?alt=T&text=T\" data-throw-if-not-resolved=\"False\" />,<xref href=\"U?alt=U&text=U\" data-throw-if-not-resolved=\"False\" />&gt;"
- uid: "com.azure.core.test.TestBase.<T,U>setPlaybackSyncPollerPollInterval(com.azure.core.util.polling.SyncPoller<T,U>)"
fullName: "com.azure.core.test.TestBase.<T,U>setPlaybackSyncPollerPollInterval(SyncPoller<T,U> syncPoller)"
name: "<T,U>setPlaybackSyncPollerPollInterval(SyncPoller<T,U> syncPoller)"
nameWithType: "TestBase.<T,U>setPlaybackSyncPollerPollInterval(SyncPoller<T,U> syncPoller)"
summary: "Sets the polling interval for the passed <xref uid=\"com.azure.core.util.polling.SyncPoller\" data-throw-if-not-resolved=\"false\" data-raw-source=\"SyncPoller\"></xref>."
modifiers:
- "protected"
parameters:
- description: "The <xref uid=\"com.azure.core.util.polling.SyncPoller\" data-throw-if-not-resolved=\"false\" data-raw-source=\"SyncPoller\"></xref>."
name: "syncPoller"
type: "<xref href=\"com.azure.core.util.polling.SyncPoller?alt=com.azure.core.util.polling.SyncPoller&text=SyncPoller\" data-throw-if-not-resolved=\"False\" />&lt;<xref href=\"T?alt=T&text=T\" data-throw-if-not-resolved=\"False\" />,<xref href=\"U?alt=U&text=U\" data-throw-if-not-resolved=\"False\" />&gt;"
syntax: "protected SyncPoller<T,U> <T,U>setPlaybackSyncPollerPollInterval(SyncPoller<T,U> syncPoller)"
desc: "Sets the polling interval for the passed <xref uid=\"com.azure.core.util.polling.SyncPoller\" data-throw-if-not-resolved=\"false\" data-raw-source=\"SyncPoller\"></xref>.\n\nThis configures the <xref uid=\"com.azure.core.util.polling.SyncPoller\" data-throw-if-not-resolved=\"false\" data-raw-source=\"SyncPoller\"></xref> to use a poll interval of one millisecond if the test mode is playback. In live or record test mode the polling interval is left as-is."
returns:
description: "The updated <xref uid=\"com.azure.core.util.polling.SyncPoller\" data-throw-if-not-resolved=\"false\" data-raw-source=\"SyncPoller\"></xref>."
type: "<xref href=\"com.azure.core.util.polling.SyncPoller?alt=com.azure.core.util.polling.SyncPoller&text=SyncPoller\" data-throw-if-not-resolved=\"False\" />&lt;<xref href=\"T?alt=T&text=T\" data-throw-if-not-resolved=\"False\" />,<xref href=\"U?alt=U&text=U\" data-throw-if-not-resolved=\"False\" />&gt;"
- uid: "com.azure.core.test.TestBase.afterTest()"
fullName: "com.azure.core.test.TestBase.afterTest()"
name: "afterTest()"
nameWithType: "TestBase.afterTest()"
summary: "Dispose of any resources and clean-up after a test case runs."
modifiers:
- "protected"
syntax: "protected void afterTest()"
desc: "Dispose of any resources and clean-up after a test case runs. Can be overridden in an inheriting class to add additional functionality during test teardown."
- uid: "com.azure.core.test.TestBase.beforeTest()"
fullName: "com.azure.core.test.TestBase.beforeTest()"
name: "beforeTest()"
nameWithType: "TestBase.beforeTest()"
summary: "Performs any set-up before each test case."
modifiers:
- "protected"
syntax: "protected void beforeTest()"
desc: "Performs any set-up before each test case. Any initialization that occurs in TestBase occurs first before this. Can be overridden in an inheriting class to add additional functionality during test set-up."
- uid: "com.azure.core.test.TestBase.getHttpClientOrUsePlayback(com.azure.core.http.HttpClient)"
fullName: "com.azure.core.test.TestBase.getHttpClientOrUsePlayback(HttpClient httpClient)"
name: "getHttpClientOrUsePlayback(HttpClient httpClient)"
nameWithType: "TestBase.getHttpClientOrUsePlayback(HttpClient httpClient)"
summary: "Convenience method which either returned the passed <xref uid=\"com.azure.core.http.HttpClient\" data-throw-if-not-resolved=\"false\" data-raw-source=\"HttpClient\"></xref> or returns a <xref uid=\"com.azure.core.test.http.PlaybackClient\" data-throw-if-not-resolved=\"false\" data-raw-source=\"PlaybackClient\"></xref> depending on whether the test mode is playback."
modifiers:
- "protected"
parameters:
- description: "The initial <xref uid=\"com.azure.core.http.HttpClient\" data-throw-if-not-resolved=\"false\" data-raw-source=\"HttpClient\"></xref> that will be used."
name: "httpClient"
type: "<xref href=\"com.azure.core.http.HttpClient?alt=com.azure.core.http.HttpClient&text=HttpClient\" data-throw-if-not-resolved=\"False\" />"
syntax: "protected HttpClient getHttpClientOrUsePlayback(HttpClient httpClient)"
desc: "Convenience method which either returned the passed <xref uid=\"com.azure.core.http.HttpClient\" data-throw-if-not-resolved=\"false\" data-raw-source=\"HttpClient\"></xref> or returns a <xref uid=\"com.azure.core.test.http.PlaybackClient\" data-throw-if-not-resolved=\"false\" data-raw-source=\"PlaybackClient\"></xref> depending on whether the test mode is playback.\n\nWhen the test mode is playback the <xref uid=\"com.azure.core.test.http.PlaybackClient\" data-throw-if-not-resolved=\"false\" data-raw-source=\"PlaybackClient\"></xref> corresponding to the test will be returned, otherwise the passed <xref uid=\"com.azure.core.http.HttpClient\" data-throw-if-not-resolved=\"false\" data-raw-source=\"HttpClient\"></xref> will be returned."
returns:
description: "Either the passed <xref uid=\"com.azure.core.http.HttpClient\" data-throw-if-not-resolved=\"false\" data-raw-source=\"HttpClient\"></xref> or <xref uid=\"com.azure.core.test.http.PlaybackClient\" data-throw-if-not-resolved=\"false\" data-raw-source=\"PlaybackClient\"></xref> based on the test mode."
type: "<xref href=\"com.azure.core.http.HttpClient?alt=com.azure.core.http.HttpClient&text=HttpClient\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.azure.core.test.TestBase.getHttpClients()"
fullName: "com.azure.core.test.TestBase.getHttpClients()"
name: "getHttpClients()"
nameWithType: "TestBase.getHttpClients()"
summary: "Returns a list of <xref uid=\"com.azure.core.http.HttpClient\" data-throw-if-not-resolved=\"false\" data-raw-source=\"HttpClients\"></xref> that should be tested."
modifiers:
- "static"
syntax: "public static Stream<HttpClient> getHttpClients()"
desc: "Returns a list of <xref uid=\"com.azure.core.http.HttpClient\" data-throw-if-not-resolved=\"false\" data-raw-source=\"HttpClients\"></xref> that should be tested."
returns:
description: "A list of <xref uid=\"com.azure.core.http.HttpClient\" data-throw-if-not-resolved=\"false\" data-raw-source=\"HttpClients\"></xref> to be tested."
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/util/stream/Stream.html\">Stream</a>&lt;<xref href=\"com.azure.core.http.HttpClient?alt=com.azure.core.http.HttpClient&text=HttpClient\" data-throw-if-not-resolved=\"False\" />&gt;"
- uid: "com.azure.core.test.TestBase.getTestClassPath()"
fullName: "com.azure.core.test.TestBase.getTestClassPath()"
name: "getTestClassPath()"
nameWithType: "TestBase.getTestClassPath()"
summary: "Returns the path of the class to which the test belongs."
modifiers:
- "protected"
syntax: "protected Path getTestClassPath()"
desc: "Returns the path of the class to which the test belongs."
returns:
description: "The file path of the test class."
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/nio/file/Path.html\">Path</a>"
- uid: "com.azure.core.test.TestBase.getTestMode()"
fullName: "com.azure.core.test.TestBase.getTestMode()"
name: "getTestMode()"
nameWithType: "TestBase.getTestMode()"
summary: "Gets the Test<wbr>Mode that has been initialized."
syntax: "public TestMode getTestMode()"
desc: "Gets the TestMode that has been initialized."
returns:
description: "The TestMode that has been initialized."
type: "<xref href=\"com.azure.core.test.TestMode?alt=com.azure.core.test.TestMode&text=TestMode\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.azure.core.test.TestBase.getTestName()"
fullName: "com.azure.core.test.TestBase.getTestName()"
name: "getTestName()"
nameWithType: "TestBase.getTestName()"
summary: "Gets the name of the current test being run."
deprecatedTag: "This method is deprecated as JUnit 5 provides a simpler mechanism to get the test method name through <xref uid=\"\" data-throw-if-not-resolved=\"false\" data-raw-source=\"TestInfo\"></xref>. Keeping this for backward compatability of other client libraries that still override this method. This method can be deleted when all client libraries remove this method. See <xref uid=\"com.azure.core.test.TestBase.setupTest(com.azure.core.test.TestContextManager)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#setupTest(TestContextManager)\"></xref>."
modifiers:
- "protected"
syntax: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Deprecated.html\">@Deprecated</a></br>protected String getTestName()"
desc: "Gets the name of the current test being run."
hasDeprecatedTag: true
returns:
description: "The name of the current test."
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
- uid: "com.azure.core.test.TestBase.isTestProxyEnabled()"
fullName: "com.azure.core.test.TestBase.isTestProxyEnabled()"
name: "isTestProxyEnabled()"
nameWithType: "TestBase.isTestProxyEnabled()"
summary: "Indicates whether the out of process test recording proxy is in use."
modifiers:
- "static"
syntax: "public static boolean isTestProxyEnabled()"
desc: "Indicates whether the out of process test recording proxy is in use."
returns:
description: "true if test proxy is to be used."
type: "<xref href=\"boolean?alt=boolean&text=boolean\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.azure.core.test.TestBase.setTestProxyEnabled()"
fullName: "com.azure.core.test.TestBase.setTestProxyEnabled()"
name: "setTestProxyEnabled()"
nameWithType: "TestBase.setTestProxyEnabled()"
summary: "Enables use of the test proxy."
modifiers:
- "protected"
- "static"
syntax: "protected static void setTestProxyEnabled()"
desc: "Enables use of the test proxy."
- uid: "com.azure.core.test.TestBase.setupClass()"
fullName: "com.azure.core.test.TestBase.setupClass()"
name: "setupClass()"
nameWithType: "TestBase.setupClass()"
summary: "Before tests are executed, determines the test mode by reading the `AZURE_TEST_MODE` environment variable."
modifiers:
- "static"
syntax: "public static void setupClass()"
desc: "Before tests are executed, determines the test mode by reading the `AZURE_TEST_MODE` environment variable. If it is not set, <xref uid=\"com.azure.core.test.TestMode.PLAYBACK\" data-throw-if-not-resolved=\"false\" data-raw-source=\"TestMode#PLAYBACK\"></xref>"
- uid: "com.azure.core.test.TestBase.setupTest(com.azure.core.test.TestContextManager)"
fullName: "com.azure.core.test.TestBase.setupTest(TestContextManager testContextManager)"
name: "setupTest(TestContextManager testContextManager)"
nameWithType: "TestBase.setupTest(TestContextManager testContextManager)"
summary: "Sets-up the <xref uid=\"com.azure.core.test.TestBase.testResourceNamer\" data-throw-if-not-resolved=\"false\" data-raw-source=\"TestBase#testResourceNamer\"></xref> and <xref uid=\"com.azure.core.test.TestBase.interceptorManager\" data-throw-if-not-resolved=\"false\" data-raw-source=\"TestBase#interceptorManager\"></xref> before each test case is run."
parameters:
- description: "The <xref uid=\"com.azure.core.test.TestContextManager\" data-throw-if-not-resolved=\"false\" data-raw-source=\"TestContextManager\"></xref> managing information about this test."
name: "testContextManager"
type: "<xref href=\"com.azure.core.test.TestContextManager?alt=com.azure.core.test.TestContextManager&text=TestContextManager\" data-throw-if-not-resolved=\"False\" />"
syntax: "public void setupTest(TestContextManager testContextManager)"
desc: "Sets-up the <xref uid=\"com.azure.core.test.TestBase.testResourceNamer\" data-throw-if-not-resolved=\"false\" data-raw-source=\"TestBase#testResourceNamer\"></xref> and <xref uid=\"com.azure.core.test.TestBase.interceptorManager\" data-throw-if-not-resolved=\"false\" data-raw-source=\"TestBase#interceptorManager\"></xref> before each test case is run. Then calls its implementing class to perform any other set-up commands."
- uid: "com.azure.core.test.TestBase.shouldClientBeTested(com.azure.core.http.HttpClient)"
fullName: "com.azure.core.test.TestBase.shouldClientBeTested(HttpClient client)"
name: "shouldClientBeTested(HttpClient client)"
nameWithType: "TestBase.shouldClientBeTested(HttpClient client)"
summary: "Returns whether the given http clients match the rules of test framework."
modifiers:
- "static"
parameters:
- description: "Http client needs to check"
name: "client"
type: "<xref href=\"com.azure.core.http.HttpClient?alt=com.azure.core.http.HttpClient&text=HttpClient\" data-throw-if-not-resolved=\"False\" />"
syntax: "public static boolean shouldClientBeTested(HttpClient client)"
desc: "Returns whether the given http clients match the rules of test framework.\n\n * Using Netty http client as default if no environment variable is set.\n * If it's set to ALL, all HttpClients in the classpath will be tested.\n * Otherwise, the name of the HttpClient class should match env variable.\n\nEnvironment values currently supported are: \"ALL\", \"netty\", \"okhttp\" which is case insensitive. Use comma to separate http clients want to test. e.g. `set AZURE_TEST_HTTP_CLIENTS = NettyAsyncHttpClient, OkHttpAsyncHttpClient`"
returns:
description: "Boolean indicates whether filters out the client or not."
type: "<xref href=\"boolean?alt=boolean&text=boolean\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.azure.core.test.TestBase.sleepIfRunningAgainstService(long)"
fullName: "com.azure.core.test.TestBase.sleepIfRunningAgainstService(long millis)"
name: "sleepIfRunningAgainstService(long millis)"
nameWithType: "TestBase.sleepIfRunningAgainstService(long millis)"
summary: "Sleeps the test for the given amount of milliseconds if <xref uid=\"com.azure.core.test.TestMode\" data-throw-if-not-resolved=\"false\" data-raw-source=\"TestMode\"></xref> isn't <xref uid=\"com.azure.core.test.TestMode.PLAYBACK\" data-throw-if-not-resolved=\"false\" data-raw-source=\"TestMode#PLAYBACK\"></xref>."
modifiers:
- "protected"
parameters:
- description: "Number of milliseconds to sleep the test."
name: "millis"
type: "<xref href=\"long?alt=long&text=long\" data-throw-if-not-resolved=\"False\" />"
syntax: "protected void sleepIfRunningAgainstService(long millis)"
desc: "Sleeps the test for the given amount of milliseconds if <xref uid=\"com.azure.core.test.TestMode\" data-throw-if-not-resolved=\"false\" data-raw-source=\"TestMode\"></xref> isn't <xref uid=\"com.azure.core.test.TestMode.PLAYBACK\" data-throw-if-not-resolved=\"false\" data-raw-source=\"TestMode#PLAYBACK\"></xref>."
- uid: "com.azure.core.test.TestBase.teardownTest()"
fullName: "com.azure.core.test.TestBase.teardownTest()"
name: "teardownTest()"
nameWithType: "TestBase.teardownTest()"
summary: "Disposes of <xref uid=\"com.azure.core.test.InterceptorManager\" data-throw-if-not-resolved=\"false\" data-raw-source=\"InterceptorManager\"></xref> and its inheriting class' resources."
syntax: "public void teardownTest()"
desc: "Disposes of <xref uid=\"com.azure.core.test.InterceptorManager\" data-throw-if-not-resolved=\"false\" data-raw-source=\"InterceptorManager\"></xref> and its inheriting class' resources."
type: "class"
desc: "Base class for running live and playback tests using <xref uid=\"com.azure.core.test.InterceptorManager\" data-throw-if-not-resolved=\"false\" data-raw-source=\"InterceptorManager\"></xref>."
metadata: {}
package: "com.azure.core.test"
artifact: com.azure:azure-core-test:1.26.2