Skip to content

Commit 164a6f2

Browse files
committed
Fix unit test break issue
1 parent e6061f2 commit 164a6f2

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

Utils/hdinsight-node-common/Test/java/com/microsoft/azure/hdinsight/sdk/common/livy/interactive/SessionScenario.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ package com.microsoft.azure.hdinsight.sdk.common.livy.interactive
2424

2525
import com.github.tomakehurst.wiremock.client.WireMock
2626
import com.github.tomakehurst.wiremock.client.WireMock.urlEqualTo
27-
import com.microsoft.azure.hdinsight.sdk.common.AzureDataLakeException
27+
import com.microsoft.azure.hdinsight.sdk.common.errorresponse.BadRequestHttpErrorStatus
2828
import com.microsoft.azure.hdinsight.spark.common.MockHttpService
2929
import cucumber.api.java.Before
3030
import cucumber.api.java.en.And
@@ -78,8 +78,8 @@ class SessionScenario {
7878
fail("Get a normal session return without exceptions.")
7979
},
8080
{ err -> run {
81-
assertThat(err).isInstanceOf(AzureDataLakeException::class.java)
82-
assertThat((err as AzureDataLakeException).statusCode).isEqualTo(statusCodeExpect)
81+
assertThat(err).isInstanceOf(BadRequestHttpErrorStatus::class.java)
82+
assertThat((err as BadRequestHttpErrorStatus).statusCode).isEqualTo(statusCodeExpect)
8383
}}
8484
)
8585

Utils/hdinsight-node-common/Test/resources/com/microsoft/azure/hdinsight/sdk/common/livy/interactive/SessionScenario.feature

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Feature: Livy Interactive Session Tests
1010
Scenario: Session.create() IT negative case with mocked http server
1111
Given setup a mock livy interactive service for POST request '/sessions' to return 'Bad Request' with status code 400
1212
And create a livy Spark interactive session instance with name 'testSparkREPL'
13-
Then check the HttpResponseException(400) when creating livy interactive session after creating should be thrown
13+
Then check the AzureDataLakeException(400) when creating livy interactive session after creating should be thrown
1414

1515
Scenario: Session.getAppId() IT positive case with mocked http server
1616
Given setup a mock livy interactive service for POST request '/sessions' to return '{"id":6,"appId":null,"owner":null,"proxyUser":null,"state":"starting","kind":"spark","appInfo":{"driverLogUrl":null,"sparkUiUrl":null},"log":[]}' with status code 200

0 commit comments

Comments
 (0)