Skip to content

Commit

Permalink
Merge branch 'master' into feature/Restricted-Case-Access
Browse files Browse the repository at this point in the history
  • Loading branch information
johnbenjamin-hmcts committed Sep 5, 2023
2 parents f87089a + e74ea0d commit 54d1539
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 11 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@hmcts/ccd-case-ui-toolkit",
"version": "6.18.0-restricted-case-access-v4",
"version": "6.19.3-mv-upgrade",
"engines": {
"yarn": "^3.5.0",
"npm": "^8.10.0"
Expand Down Expand Up @@ -65,7 +65,7 @@
"@edium/fsm": "^2.1.2",
"@hmcts/ccpay-web-component": "5.2.8",
"@hmcts/frontend": "^0.0.50-alpha",
"@hmcts/media-viewer": "2.9.3",
"@hmcts/media-viewer": "2.9.5",
"@ngrx/effects": "^7.4.0",
"@ngrx/store": "^7.4.0",
"@nicky-lenaers/ngx-scroll-to": "^9.0.0",
Expand Down
2 changes: 1 addition & 1 deletion projects/ccd-case-ui-toolkit/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@hmcts/ccd-case-ui-toolkit",
"version": "6.18.0-restricted-case-access-v4",
"version": "6.19.3-mv-upgrade",
"engines": {
"yarn": "^3.5.0",
"npm": "^8.10.0"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ describe('CasesService', () => {
appConfig.getCaseDataStoreApiUrl.and.returnValue(API_URL);
appConfig.getEnvironment.and.returnValue('demo');
appConfig.getTimeoutsForCaseRetrieval.and.returnValue([20])
appConfig.getTimeoutsCaseRetrievalArtificialDelay.and.returnValue(2)
appConfig.getTimeoutsCaseRetrievalArtificialDelay.and.returnValue(0)
httpService = createSpyObj<HttpService>('httpService', ['get', 'post']);
sessionStorageService = createSpyObj<SessionStorageService>('sessionStorageService', ['getItem']);
errorService = createSpyObj<HttpErrorService>('errorService', ['setError']);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,11 @@ export class CasesService {

const artificialDelay: number = this.appConfig.getTimeoutsCaseRetrievalArtificialDelay();
const timeoutPeriods = this.appConfig.getTimeoutsForCaseRetrieval();
if (timeoutPeriods && timeoutPeriods.length > 0 && timeoutPeriods[1] > 0) {
console.log(`Timeout periods: ${timeoutPeriods} seconds.`);
if (timeoutPeriods && timeoutPeriods.length > 0 && timeoutPeriods[0] > 0) {
http$ = this.retryUtil.pipeTimeoutMechanismOn(http$, artificialDelay, timeoutPeriods);
} else {
console.warn('Skipping to pipe a retry mechanism!');
}

http$ = this.pipeErrorProcessor(http$);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ export class RetryUtil {

private pipeTimeOutControlOn<T>(in$: Observable<T>, timeoutPeriods: number[]): Observable<T> {
const timeOutAfterSeconds = timeoutPeriods[0];
console.info(`Piping timeout control with ${timeOutAfterSeconds} seconds.`);
const out$ = in$.pipe(timeout(timeOutAfterSeconds * 1000));
return out$;
}
Expand All @@ -68,7 +69,7 @@ export class RetryUtil {
}
else {
console.error('Will NOT retry.');
throwError(error);
throw error;
}
return timer(0);
}),
Expand Down
10 changes: 5 additions & 5 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2678,7 +2678,7 @@ __metadata:
"@edium/fsm": ^2.1.2
"@hmcts/ccpay-web-component": 5.2.8
"@hmcts/frontend": ^0.0.50-alpha
"@hmcts/media-viewer": 2.9.3
"@hmcts/media-viewer": 2.9.5
"@ngrx/effects": ^7.4.0
"@ngrx/store": ^7.4.0
"@nicky-lenaers/ngx-scroll-to": ^9.0.0
Expand Down Expand Up @@ -2809,9 +2809,9 @@ __metadata:
languageName: node
linkType: hard

"@hmcts/media-viewer@npm:2.9.3":
version: 2.9.3
resolution: "@hmcts/media-viewer@npm:2.9.3"
"@hmcts/media-viewer@npm:2.9.5":
version: 2.9.5
resolution: "@hmcts/media-viewer@npm:2.9.5"
dependencies:
"@circlon/angular-tree-component": ^11.0.0
"@swimlane/ngx-datatable": ^19.0.0
Expand All @@ -2832,7 +2832,7 @@ __metadata:
"@ngrx/router-store": ^11.0.0
"@ngrx/store": ^11.0.0
"@ngrx/store-devtools": ^11.0.0
checksum: d6702c0141da24cd7ebaecb5764f5f6eae825cdcd4633c06cfb5d613b314dac4ba899292be9543a8b359f48091f78d36e5ea58bfc050afc5f0947bdedc06a628
checksum: c089394177ea3d28b9913b4072154cc5c33879b11062b07631adf1594786b533ba9593aea15919eedd50b0c91bd2814689f8f2e9b95d703eed20e6976b5eb2fb
languageName: node
linkType: hard

Expand Down

0 comments on commit 54d1539

Please sign in to comment.