Skip to content

Commit

Permalink
test: fix unit test flapper in linux (#5871)
Browse files Browse the repository at this point in the history
  • Loading branch information
CristiCanizales authored Sep 24, 2024
1 parent d0dfe8f commit 7b872ad
Showing 1 changed file with 16 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,22 @@ describe('AppInsights', () => {
let appInsights: AppInsights;

beforeEach(() => {
jest.spyOn(os, 'hostname').mockReturnValue('test.internal.salesforce.com');
jest
.spyOn(os, 'hostname')
.mockReturnValue('test.internal.salesforce.com');
jest.spyOn(os, 'cpus').mockReturnValue([
{
model: 'AMD EPYC 7763 64-Core Processor',
speed: 3242,
times: {
user: 100000,
nice: 0,
sys: 100000,
idle: 1000000,
irq: 0
}
}
]);
jest.spyOn(os, 'userInfo').mockReturnValue({
username: 'testuser',
uid: 1001,
Expand Down

0 comments on commit 7b872ad

Please sign in to comment.