Skip to content

Commit

Permalink
Fix unit test failures
Browse files Browse the repository at this point in the history
  • Loading branch information
wuhaixian1984 committed Sep 12, 2024
1 parent 8ca58ba commit 7d98cab
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions __tests__/config.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@ const defaultConfig: SManagerConfig = {
maxFileSize: 0,
minReplicas: 0,
maxReplicas: 0,
filesSkipRate: 0,
enableProbabilityFilter: false,
sealFailedRetryCount: 3,
sealFailedRetryInterval: 3,
},
};

Expand All @@ -46,6 +50,10 @@ describe('config validation', () => {
maxFileSize: 0,
minReplicas: 0,
maxReplicas: 0,
filesSkipRate: 0,
enableProbabilityFilter: false,
sealFailedRetryCount: 3,
sealFailedRetryInterval: 3,
},
};
expect(validateConfig(srdStrategey).scheduler.strategy).toBe('srdFirst');
Expand All @@ -65,6 +73,10 @@ describe('config validation', () => {
maxFileSize: 0,
minReplicas: 0,
maxReplicas: 0,
filesSkipRate: 0,
enableProbabilityFilter: false,
sealFailedRetryCount: 3,
sealFailedRetryInterval: 3,
},
};
expect(validateConfig(customWeights).scheduler.strategy).toStrictEqual({
Expand All @@ -88,6 +100,10 @@ describe('config validation', () => {
maxFileSize: 0,
minReplicas: 0,
maxReplicas: 0,
filesSkipRate: 0,
enableProbabilityFilter: false,
sealFailedRetryCount: 3,
sealFailedRetryInterval: 3,
},
};
expect(() => validateConfig(config)).toThrow();
Expand All @@ -109,6 +125,10 @@ describe('config validation', () => {
maxFileSize: 0,
minReplicas: 0,
maxReplicas: 0,
filesSkipRate: 0,
enableProbabilityFilter: false,
sealFailedRetryCount: 3,
sealFailedRetryInterval: 3,
},
};
expect(normalizeConfig(config).scheduler.strategy).toStrictEqual({
Expand Down

0 comments on commit 7d98cab

Please sign in to comment.