File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
Utils/hdinsight-node-common/Test/java/com/microsoft/azure/hdinsight/sdk/common/livy/interactive Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -24,12 +24,12 @@ package com.microsoft.azure.hdinsight.sdk.common.livy.interactive
2424
2525import com.github.tomakehurst.wiremock.client.WireMock
2626import com.github.tomakehurst.wiremock.client.WireMock.urlEqualTo
27+ import com.microsoft.azure.hdinsight.sdk.common.AzureDataLakeException
2728import com.microsoft.azure.hdinsight.spark.common.MockHttpService
2829import cucumber.api.java.Before
2930import cucumber.api.java.en.And
3031import cucumber.api.java.en.Given
3132import cucumber.api.java.en.Then
32- import org.apache.http.client.HttpResponseException
3333import org.assertj.core.api.Assertions.assertThat
3434import java.net.URI
3535import kotlin.test.fail
@@ -70,16 +70,16 @@ class SessionScenario {
7070 }}
7171 }
7272
73- @Then(" ^check the HttpResponseException \\ ((\\ d+)\\ ) when creating livy interactive session after creating should be thrown$" )
73+ @Then(" ^check the AzureDataLakeException \\ ((\\ d+)\\ ) when creating livy interactive session after creating should be thrown$" )
7474 fun checkCreateSessionException (statusCodeExpect : Int ) {
7575 sessionMock!! .create()
7676 .subscribe(
7777 {
7878 fail(" Get a normal session return without exceptions." )
7979 },
8080 { err -> run {
81- assertThat(err).isInstanceOf(HttpResponseException ::class .java)
82- assertThat((err as HttpResponseException ).statusCode).isEqualTo(statusCodeExpect)
81+ assertThat(err).isInstanceOf(AzureDataLakeException ::class .java)
82+ assertThat((err as AzureDataLakeException ).statusCode).isEqualTo(statusCodeExpect)
8383 }}
8484 )
8585
You can’t perform that action at this time.
0 commit comments