Skip to content

Commit 70056b9

Browse files
committed
[autoscaler] adjust the time setting for scaling events test
1 parent 0e87e40 commit 70056b9

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/frontend/packages/cf-autoscaler/src/shared/list-types/app-autoscaler-event/cf-app-autoscaler-events-config.service.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ export class CfAppAutoscalerEventsConfigService
8484
isLocal = false;
8585

8686
showCustomTime = true;
87-
customTimePollingInterval = 120000;
87+
customTimePollingInterval = 30000;
8888
customTimeInitialValue = '1:month';
8989
customTimeWindows: ITimeRange[] = [
9090
{

src/test-e2e/application/application-autoscaler-e2e.spec.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ describe('Autoscaler -', () => {
124124
// Fill in form -- valid inputs
125125
createPolicy.stepper.getStepperForm().fill({ metric_type: 'memoryutil' });
126126
createPolicy.stepper.getStepperForm().fill({ operator: '>=' });
127-
createPolicy.stepper.getStepperForm().fill({ threshold: '20' });
127+
createPolicy.stepper.getStepperForm().fill({ threshold: '60' });
128128
createPolicy.stepper.getStepperForm().fill({ breach_duration_secs: '60' });
129129
expect(createPolicy.stepper.getMatErrorsCount()).toBe(0);
130130
expect(createPolicy.stepper.getDoneButtonDisabledStatus()).toBe(null);
@@ -213,7 +213,7 @@ describe('Autoscaler -', () => {
213213
expect(createPolicy.stepper.canNext()).toBeFalsy();
214214

215215
// Schedule dates should not overlap
216-
const scheduleStartDate1 = moment().tz('UTC').add(1, 'minutes').add(30, 'seconds'); // Should be set close to time it's entered
216+
const scheduleStartDate1 = moment().tz('UTC').add(1, 'minutes').add(10, 'seconds'); // Should be set close to time it's entered
217217
scheduleEndDate1 = moment().tz('UTC').add(2, 'days');
218218
scheduleStartDate2 = moment().tz('UTC').add(3, 'days');
219219
scheduleEndDate2 = moment().tz('UTC').add(4, 'days');
@@ -275,7 +275,7 @@ describe('Autoscaler -', () => {
275275

276276
expect(appAutoscaler.tableTriggers.getTableRowsCount()).toBe(2);
277277
expect(appAutoscaler.tableTriggers.getTableRowCellContent(0, 0)).toBe('memoryutil');
278-
expect(appAutoscaler.tableTriggers.getTableRowCellContent(0, 1)).toBe('>=20 % for 60 secs.');
278+
expect(appAutoscaler.tableTriggers.getTableRowCellContent(0, 1)).toBe('>=60 % for 60 secs.');
279279
expect(appAutoscaler.tableTriggers.getTableRowCellContent(0, 2)).toBe('+2 instances');
280280
expect(appAutoscaler.tableTriggers.getTableRowCellContent(1, 0)).toBe('throughput');
281281
expect(appAutoscaler.tableTriggers.getTableRowCellContent(1, 1)).toBe('<=10rps for 120 secs.');
@@ -528,7 +528,7 @@ describe('Autoscaler -', () => {
528528

529529
// TODO: It takes about 130s of waiting for the event to show up, which is a long time to wait about.
530530
// This depends on scheduleStartDate1
531-
extendE2ETestTime(180000);
531+
extendE2ETestTime(60000);
532532
function waitForRow() {
533533
const sub = timer(5000, 5000).pipe(
534534
switchMap(() => eventPageBase.list.table.getRowCount())

0 commit comments

Comments
 (0)