Skip to content

Commit 915d8d9

Browse files
committed
Update internal_actions_memory.test.ts
1 parent 37c5ec2 commit 915d8d9

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/platform/plugins/shared/workflows_management/common/internal_actions_memory.test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import { getElasticsearchConnectors, getKibanaConnectors } from '@kbn/workflows'
1616
import { parseWorkflowYamlToJSON } from './lib/yaml';
1717
import { getWorkflowZodSchema } from './schema';
1818

19-
const threesholdInPersents = 1.3;
19+
const threesholdInPersents = 1.2; // +20% to allow for minor runtime variance
2020

2121
describe('internal connectors memory tests', () => {
2222
const forceGC = () => {
@@ -63,7 +63,7 @@ describe('internal connectors memory tests', () => {
6363
retainer.push(getWorkflowZodSchema({}));
6464
forceGC();
6565
const after = getHeapMB();
66-
expect(after - before).toBeLessThan(10);
66+
expect(after - before).toBeLessThan(10 * threesholdInPersents); // Current baseline ~10 MB; threshold allows for minor runtime variance
6767
expect(retainer.length).toBe(1);
6868
});
6969
});
@@ -77,7 +77,7 @@ describe('internal connectors memory tests', () => {
7777
retainer.push(parseWorkflowYamlToJSON(workflowYaml, schema));
7878
forceGC();
7979
const after = getHeapMB();
80-
expect(after - before).toBeLessThan(70);
80+
expect(after - before).toBeLessThan(70 * threesholdInPersents); // Current baseline ~70 MB; threshold allows for minor runtime variance
8181
expect(retainer.length).toBe(2);
8282
});
8383
});

0 commit comments

Comments
 (0)