Skip to content

Commit

Permalink
fix fe checkstyle and backend ut
Browse files Browse the repository at this point in the history
  • Loading branch information
dcoliversun committed Aug 7, 2024
1 parent 0acab45 commit 4a91e5b
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -158,13 +158,19 @@ public void testTraceApplication() throws Exception {
adbSparkTask.setAppIds(mockAppId);

// mock
when(mockAdbSparkClient.submitSparkApp(any())).thenReturn(mockSubmitSparkAppResponse);
when(mockSubmitSparkAppResponse.getBody()).thenReturn(mockSubmitSparkAppResponseBody);
when(mockSubmitSparkAppResponseBody.getData()).thenReturn(mockSubmitSparkAppResponseBodyData);
when(mockSubmitSparkAppResponseBodyData.getAppId()).thenReturn(mockAppId);

when(mockAdbSparkClient.getSparkAppState(any(GetSparkAppStateRequest.class)))
.thenReturn(mockGetSparkAppStateResponse);
when(mockGetSparkAppStateResponse.getBody()).thenReturn(mockGetSparkAppStateResponseBody);
when(mockGetSparkAppStateResponseBody.getData()).thenReturn(mockGetSparkAppStateResponseBodyData);
when(mockGetSparkAppStateResponseBodyData.getState()).thenReturn("COMPLETED");

// action
adbSparkTask.submitApplication();
adbSparkTask.trackApplicationStatus();

// verify
Expand All @@ -177,7 +183,20 @@ public void testCancelApplication() throws Exception {
adbSparkTask.init();
adbSparkTask.setAppIds(mockAppId);

// mock
when(mockAdbSparkClient.submitSparkApp(any())).thenReturn(mockSubmitSparkAppResponse);
when(mockSubmitSparkAppResponse.getBody()).thenReturn(mockSubmitSparkAppResponseBody);
when(mockSubmitSparkAppResponseBody.getData()).thenReturn(mockSubmitSparkAppResponseBodyData);
when(mockSubmitSparkAppResponseBodyData.getAppId()).thenReturn(mockAppId);

when(mockAdbSparkClient.getSparkAppState(any(GetSparkAppStateRequest.class)))
.thenReturn(mockGetSparkAppStateResponse);
when(mockGetSparkAppStateResponse.getBody()).thenReturn(mockGetSparkAppStateResponseBody);
when(mockGetSparkAppStateResponseBody.getData()).thenReturn(mockGetSparkAppStateResponseBodyData);
when(mockGetSparkAppStateResponseBodyData.getState()).thenReturn("SUBMITTED");

// action
adbSparkTask.submitApplication();
adbSparkTask.cancelApplication();

// verify
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,8 @@
* limitations under the License.
*/
import { useI18n } from 'vue-i18n'
import {useCustomParams, useResources} from '.'
import { useCustomParams } from '.'
import type { IJsonItem } from '../types'
import {ref} from "vue";

export function useADBSPARK(model: { [field: string]: any}): IJsonItem[] {

Expand Down

0 comments on commit 4a91e5b

Please sign in to comment.