Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#1722 - E2E Tests for assessment gateway #1822

Merged
merged 14 commits into from
Mar 22, 2023
Prev Previous commit
Next Next commit
Assessment Gateway tests
dheepak-aot committed Mar 21, 2023
commit fbaefe58814b58ff99d1f5262007439e98de303f
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
import { ASSESSMENT_ID } from "@sims/services/workflow/variables/assessment-gateway";
import {
ApplicationExceptionStatus,
AssessmentTriggerType,
ProgramInfoStatus,
} from "@sims/sims-db";
import { ZBClient } from "zeebe-node";
import {
createFakeConsolidatedFulltimeData,
ZeebeMockedClient,
E2E_STUDENT_STATUS,
E2E_APPLICATION_EXCEPTION_STATUS,
E2E_PIR_STATUS,
PROCESS_INSTANCE_CREATE_TIMEOUT,
} from "../../test-utils";
import { PROGRAM_YEAR } from "../constants/program-year.constants";

describe("E2E Test Workflow assessment gateway", () => {
let zeebeClientProvider: ZBClient;
beforeAll(async () => {
zeebeClientProvider = ZeebeMockedClient.getMockedZeebeInstance();
});

it("Should generate expected fulltime assessment values for a single and independent student.", async () => {
// Arrange
const assessmentConsolidatedData =
createFakeConsolidatedFulltimeData(PROGRAM_YEAR);
assessmentConsolidatedData.assessmentTriggerType =
AssessmentTriggerType.OriginalAssessment;

await zeebeClientProvider.createProcessInstanceWithResult({
bpmnProcessId: "assessment-gateway",
variables: {
...assessmentConsolidatedData,
[ASSESSMENT_ID]: 1,
[E2E_STUDENT_STATUS]: "independentSingleStudent",
[E2E_APPLICATION_EXCEPTION_STATUS]: ApplicationExceptionStatus.Approved,
[E2E_PIR_STATUS]: ProgramInfoStatus.notRequired,
},
requestTimeout: PROCESS_INSTANCE_CREATE_TIMEOUT,
});
});
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
import { ASSESSMENT_ID } from "@sims/services/workflow/variables/assessment-gateway";
import { AssessmentTriggerType } from "@sims/sims-db";
import { ZBClient } from "zeebe-node";
import {
createFakeConsolidatedFulltimeData,
ZeebeMockedClient,
E2E_STUDENT_STATUS,
PROCESS_INSTANCE_CREATE_TIMEOUT,
} from "../../test-utils";
import { PROGRAM_YEAR } from "../constants/program-year.constants";

describe("E2E Test Workflow assessment gateway", () => {
let zeebeClientProvider: ZBClient;
beforeAll(async () => {
zeebeClientProvider = ZeebeMockedClient.getMockedZeebeInstance();
});

it("Should generate expected fulltime assessment values for a single and independent student.", async () => {
// Arrange
const assessmentConsolidatedData =
createFakeConsolidatedFulltimeData(PROGRAM_YEAR);
assessmentConsolidatedData.assessmentTriggerType =
AssessmentTriggerType.StudentAppeal;

// Act/Assert
await zeebeClientProvider.createProcessInstanceWithResult({
bpmnProcessId: "assessment-gateway",
variables: {
...assessmentConsolidatedData,
[ASSESSMENT_ID]: 1,
[E2E_STUDENT_STATUS]: "independentSingleStudent",
},
requestTimeout: PROCESS_INSTANCE_CREATE_TIMEOUT,
});
});
});
Original file line number Diff line number Diff line change
@@ -5,13 +5,17 @@ import {
CalculatedAssessmentModel,
} from "../../models";
import { ZBClient } from "zeebe-node";
import { createFakeAssessmentConsolidatedData } from "../../test-utils";
import {
createFakeAssessmentConsolidatedData,
PROCESS_INSTANCE_CREATE_TIMEOUT,
ZeebeMockedClient,
} from "../../test-utils";
import { PROGRAM_YEAR } from "../constants/program-year.constants";

describe(`E2E Test Workflow fulltime-assessment-${PROGRAM_YEAR}`, () => {
let zeebeClientProvider: ZBClient;
beforeAll(async () => {
zeebeClientProvider = new ZBClient();
zeebeClientProvider = ZeebeMockedClient.getMockedZeebeInstance();
});

it("Should generate expected fulltime assessment values when the student is single and independent.", async () => {
@@ -54,7 +58,13 @@ describe(`E2E Test Workflow fulltime-assessment-${PROGRAM_YEAR}`, () => {
await zeebeClientProvider.createProcessInstanceWithResult<
AssessmentConsolidatedData,
CalculatedAssessmentModel
>(`fulltime-assessment-${PROGRAM_YEAR}`, assessmentConsolidatedData);
>({
bpmnProcessId: `fulltime-assessment-${PROGRAM_YEAR}`,
variables: {
...assessmentConsolidatedData,
},
requestTimeout: PROCESS_INSTANCE_CREATE_TIMEOUT,
});
// TODO: totalFederalContribution and totalProvincialContribution needs to be validated
// once it is fixed in bpmn.
expect(calculatedAssessment.variables.offeringWeeks).toBe(
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
import { ASSESSMENT_ID } from "@sims/services/workflow/variables/assessment-gateway";
import {
ApplicationExceptionStatus,
AssessmentTriggerType,
ProgramInfoStatus,
} from "@sims/sims-db";
import { ZBClient } from "zeebe-node";
import {
createFakeConsolidatedFulltimeData,
ZeebeMockedClient,
E2E_STUDENT_STATUS,
E2E_APPLICATION_EXCEPTION_STATUS,
E2E_PIR_STATUS,
PROCESS_INSTANCE_CREATE_TIMEOUT,
} from "../../test-utils";
import { PROGRAM_YEAR } from "../constants/program-year.constants";

describe("E2E Test Workflow assessment gateway", () => {
let zeebeClientProvider: ZBClient;
beforeAll(async () => {
zeebeClientProvider = ZeebeMockedClient.getMockedZeebeInstance();
});

it("Should generate expected fulltime assessment values for a single and independent student.", async () => {
// Arrange
const assessmentConsolidatedData =
createFakeConsolidatedFulltimeData(PROGRAM_YEAR);
assessmentConsolidatedData.assessmentTriggerType =
AssessmentTriggerType.OriginalAssessment;

await zeebeClientProvider.createProcessInstanceWithResult({
bpmnProcessId: "assessment-gateway",
variables: {
...assessmentConsolidatedData,
[ASSESSMENT_ID]: 1,
[E2E_STUDENT_STATUS]: "independentSingleStudent",
[E2E_APPLICATION_EXCEPTION_STATUS]: ApplicationExceptionStatus.Approved,
[E2E_PIR_STATUS]: ProgramInfoStatus.notRequired,
},
requestTimeout: PROCESS_INSTANCE_CREATE_TIMEOUT,
});
});
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
import { ASSESSMENT_ID } from "@sims/services/workflow/variables/assessment-gateway";
import { AssessmentTriggerType } from "@sims/sims-db";
import { ZBClient } from "zeebe-node";
import {
createFakeConsolidatedFulltimeData,
ZeebeMockedClient,
E2E_STUDENT_STATUS,
PROCESS_INSTANCE_CREATE_TIMEOUT,
} from "../../test-utils";
import { PROGRAM_YEAR } from "../constants/program-year.constants";

describe("E2E Test Workflow assessment gateway", () => {
let zeebeClientProvider: ZBClient;
beforeAll(async () => {
zeebeClientProvider = ZeebeMockedClient.getMockedZeebeInstance();
});

it("Should generate expected fulltime assessment values for a single and independent student.", async () => {
// Arrange
const assessmentConsolidatedData =
createFakeConsolidatedFulltimeData(PROGRAM_YEAR);
assessmentConsolidatedData.assessmentTriggerType =
AssessmentTriggerType.StudentAppeal;

await zeebeClientProvider.createProcessInstanceWithResult({
bpmnProcessId: "assessment-gateway",
variables: {
...assessmentConsolidatedData,
[ASSESSMENT_ID]: 1,
[E2E_STUDENT_STATUS]: "independentSingleStudent",
},
requestTimeout: PROCESS_INSTANCE_CREATE_TIMEOUT,
});
});
});
Original file line number Diff line number Diff line change
@@ -5,13 +5,17 @@ import {
CalculatedAssessmentModel,
} from "../../models";
import { ZBClient } from "zeebe-node";
import { createFakeAssessmentConsolidatedData } from "../../test-utils";
import {
createFakeAssessmentConsolidatedData,
PROCESS_INSTANCE_CREATE_TIMEOUT,
ZeebeMockedClient,
} from "../../test-utils";
import { PROGRAM_YEAR } from "../constants/program-year.constants";

describe(`E2E Test Workflow fulltime-assessment-${PROGRAM_YEAR}`, () => {
let zeebeClientProvider: ZBClient;
beforeAll(async () => {
zeebeClientProvider = new ZBClient();
zeebeClientProvider = ZeebeMockedClient.getMockedZeebeInstance();
});

it("Should generate expected fulltime assessment values when the student is single and independent.", async () => {
@@ -54,7 +58,13 @@ describe(`E2E Test Workflow fulltime-assessment-${PROGRAM_YEAR}`, () => {
await zeebeClientProvider.createProcessInstanceWithResult<
AssessmentConsolidatedData,
CalculatedAssessmentModel
>(`fulltime-assessment-${PROGRAM_YEAR}`, assessmentConsolidatedData);
>({
bpmnProcessId: `fulltime-assessment-${PROGRAM_YEAR}`,
variables: {
...assessmentConsolidatedData,
},
requestTimeout: PROCESS_INSTANCE_CREATE_TIMEOUT,
});
// TODO: totalFederalContribution and totalProvincialContribution needs to be validated
// once it is fixed in bpmn.
expect(calculatedAssessment.variables.offeringWeeks).toBe(
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
import { ASSESSMENT_ID } from "@sims/services/workflow/variables/assessment-gateway";
import {
ApplicationExceptionStatus,
AssessmentTriggerType,
ProgramInfoStatus,
} from "@sims/sims-db";
import { ZBClient } from "zeebe-node";
import {
createFakeConsolidatedFulltimeData,
ZeebeMockedClient,
E2E_STUDENT_STATUS,
E2E_APPLICATION_EXCEPTION_STATUS,
E2E_PIR_STATUS,
PROCESS_INSTANCE_CREATE_TIMEOUT,
} from "../../test-utils";
import { PROGRAM_YEAR } from "../constants/program-year.constants";

describe("E2E Test Workflow assessment gateway", () => {
let zeebeClientProvider: ZBClient;
beforeAll(async () => {
zeebeClientProvider = ZeebeMockedClient.getMockedZeebeInstance();
});

it("Should generate expected fulltime assessment values for a single and independent student.", async () => {
// Arrange
const assessmentConsolidatedData =
createFakeConsolidatedFulltimeData(PROGRAM_YEAR);
assessmentConsolidatedData.assessmentTriggerType =
AssessmentTriggerType.OriginalAssessment;

await zeebeClientProvider.createProcessInstanceWithResult({
bpmnProcessId: "assessment-gateway",
variables: {
...assessmentConsolidatedData,
[ASSESSMENT_ID]: 1,
[E2E_STUDENT_STATUS]: "independentSingleStudent",
[E2E_APPLICATION_EXCEPTION_STATUS]: ApplicationExceptionStatus.Approved,
[E2E_PIR_STATUS]: ProgramInfoStatus.notRequired,
},
requestTimeout: PROCESS_INSTANCE_CREATE_TIMEOUT,
});
});
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
import { ASSESSMENT_ID } from "@sims/services/workflow/variables/assessment-gateway";
import { AssessmentTriggerType } from "@sims/sims-db";
import { ZBClient } from "zeebe-node";
import {
createFakeConsolidatedFulltimeData,
ZeebeMockedClient,
E2E_STUDENT_STATUS,
PROCESS_INSTANCE_CREATE_TIMEOUT,
} from "../../test-utils";
import { PROGRAM_YEAR } from "../constants/program-year.constants";

describe("E2E Test Workflow assessment gateway", () => {
let zeebeClientProvider: ZBClient;
beforeAll(async () => {
zeebeClientProvider = ZeebeMockedClient.getMockedZeebeInstance();
});

it("Should generate expected fulltime assessment values for a single and independent student.", async () => {
// Arrange
const assessmentConsolidatedData =
createFakeConsolidatedFulltimeData(PROGRAM_YEAR);
assessmentConsolidatedData.assessmentTriggerType =
AssessmentTriggerType.StudentAppeal;

await zeebeClientProvider.createProcessInstanceWithResult({
bpmnProcessId: "assessment-gateway",
variables: {
...assessmentConsolidatedData,
[ASSESSMENT_ID]: 1,
[E2E_STUDENT_STATUS]: "independentSingleStudent",
},
requestTimeout: PROCESS_INSTANCE_CREATE_TIMEOUT,
});
});
});
Original file line number Diff line number Diff line change
@@ -5,13 +5,17 @@ import {
CalculatedAssessmentModel,
} from "../../models";
import { ZBClient } from "zeebe-node";
import { createFakeAssessmentConsolidatedData } from "../../test-utils";
import {
createFakeAssessmentConsolidatedData,
PROCESS_INSTANCE_CREATE_TIMEOUT,
ZeebeMockedClient,
} from "../../test-utils";
import { PROGRAM_YEAR } from "../constants/program-year.constants";

describe(`E2E Test Workflow fulltime-assessment-${PROGRAM_YEAR}`, () => {
let zeebeClientProvider: ZBClient;
beforeAll(async () => {
zeebeClientProvider = new ZBClient();
zeebeClientProvider = ZeebeMockedClient.getMockedZeebeInstance();
});

it("Should generate expected fulltime assessment values when the student is single and independent.", async () => {
@@ -59,7 +63,13 @@ describe(`E2E Test Workflow fulltime-assessment-${PROGRAM_YEAR}`, () => {
await zeebeClientProvider.createProcessInstanceWithResult<
AssessmentConsolidatedData,
CalculatedAssessmentModel
>(`fulltime-assessment-${PROGRAM_YEAR}`, assessmentConsolidatedData);
>({
bpmnProcessId: `fulltime-assessment-${PROGRAM_YEAR}`,
variables: {
...assessmentConsolidatedData,
},
requestTimeout: PROCESS_INSTANCE_CREATE_TIMEOUT,
});
// TODO: totalFederalContribution and totalProvincialContribution needs to be validated
// once it is fixed in bpmn.
expect(calculatedAssessment.variables.offeringWeeks).toBe(

This file was deleted.

2 changes: 1 addition & 1 deletion sources/packages/backend/workflow/test/jest-e2e.json
Original file line number Diff line number Diff line change
@@ -10,7 +10,7 @@
"transform": {
"^.+\\.(t|j)s$": "ts-jest"
},
"testTimeout": 60000,
"testTimeout": 90000,
"setupFiles": [
"<rootDir>/../env-setup.js"
],
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
import { AssessmentTriggerType, OfferingIntensity } from "@sims/sims-db";
import {
ApplicationExceptionStatus,
AssessmentTriggerType,
OfferingIntensity,
} from "@sims/sims-db";
import {
Provinces,
YesNoOptions,
@@ -96,6 +100,8 @@ export interface AssessmentConsolidatedData {
partner1CRAReportedIncome?: number;
partner1TotalIncome?: number;
assessmentId?: number;
applicationExceptionStatus?: ApplicationExceptionStatus;
studentDataSelectedOffering: number;
}

export interface AssessmentModel {
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export const PROCESS_INSTANCE_CREATE_TIMEOUT = 90000;
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
export const E2E_STUDENT_STATUS = "e2eTestStudentStatus";

export const E2E_APPLICATION_EXCEPTION_STATUS =
"e2eTestApplicationExceptionStatus";

export const E2E_PIR_STATUS = "e2ePIRStatus";
Original file line number Diff line number Diff line change
@@ -4,6 +4,7 @@ import {
YesNoOptions,
OfferingDeliveryOptions,
} from "@sims/test-utils";
import { OfferingIntensity } from "@sims/sims-db";

export function createFakeAssessmentConsolidatedData(
programYear: string,
@@ -71,6 +72,7 @@ function setDefaultAssessmentConsolidatedData(): AssessmentConsolidatedData {
studentDataDaycareCosts12YearsOrOver: null,
studentDataLivingathomeRent: null,
studentDataTransportationCost: null,
studentDataSelectedOffering: null,
offeringCourseLoad: null,
parent1Contributions: null,
parent1Ei: null,
@@ -98,5 +100,18 @@ function setDefaultAssessmentConsolidatedData(): AssessmentConsolidatedData {
partner1TotalIncome: null,
partner1CRAReportedIncome: null,
assessmentId: null,
applicationExceptionStatus: null,
} as AssessmentConsolidatedData;
}

export function createFakeConsolidatedFulltimeData(
programYear: string,
): AssessmentConsolidatedData {
const [, programEndYear] = programYear.split("-");
const assessmentConsolidatedData =
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have a qn here, next if we want to test a different set of info, for eg, TEST a "full time" assessment with a "dependent" status application, are we planning to make this method generic for all FT tests or are we planning to create "createFakeConsolidatedSOMETHINGFT". do we have a plan? or we are planning to figure it out on the way.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The plan should be for e.g. TEST a "full time" assessment with a "dependent" if required only at a test case level, then it will be prepared at test case by using generic method and modifying it. Same if it is required at e2e test file level, then it can be prepared at beforeAll(), or else if it is required for multiple test files then createFakeConsolidatedSOMETHINGFT will be created at factory level.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, there is nothing against creating a new createFakeAssessmentConsolidatedData with some initial data as a baseline, for instance.

  • createFakeAssessmentConsolidatedDataForTwoParents
  • createFakeAssessmentConsolidatedDataWithDependents
  • createFakeAssessmentConsolidatedDataWithPartner
  • createFakeAssessmentConsolidatedDataForPIR
    Or have all of them as options on the createFakeAssessmentConsolidatedData
createFakeAssessmentConsolidatedData(options: {
    includeParent1SupportingData: boolean,
    includeParent2SupportingData: boolean,
    includePartnerSupportingData: boolean,
    generateDependents: numbers
})

createFakeAssessmentConsolidatedData(programYear);
assessmentConsolidatedData.offeringIntensity = OfferingIntensity.fullTime;
assessmentConsolidatedData.offeringStudyStartDate = `${programEndYear}-02-01`;
assessmentConsolidatedData.offeringStudyEndDate = `${programEndYear}-05-24`;
return assessmentConsolidatedData;
}
2 changes: 2 additions & 0 deletions sources/packages/backend/workflow/test/test-utils/index.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
export * from "./factories/assessment-consolidated-data";
export * from "./mock/zeebe-worker-mock";
export * from "./constants/workflow-variables-constants";
export * from "./constants/system-configurations-constants";
Original file line number Diff line number Diff line change
@@ -1,22 +1,105 @@
import { ZBClient } from "zeebe-node";

export function createZeebeClient(): ZBClient {
const zeebeClient = new ZBClient();
zeebeClient.createWorker({
taskType: "associate-workflow-instance",
taskHandler: (job) => job.complete(),
});
zeebeClient.createWorker({
taskType: "save-disbursement-schedules",
taskHandler: (job) => job.complete(),
});
zeebeClient.createWorker({
taskType: "save-assessment-data",
taskHandler: (job) => job.complete(),
});
zeebeClient.createWorker({
taskType: "update-noa-status",
taskHandler: (job) => job.complete(),
});
return zeebeClient;
import { AssessmentConsolidatedData } from "../../models";
import { Duration, ZBClient, ZBWorkerConfig } from "zeebe-node";
import { ApplicationExceptionStatus, ProgramInfoStatus } from "@sims/sims-db";

Copy link
Contributor

@ann-aot ann-aot Mar 21, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mm, I need a walk-through of this file logic

interface FakeAssessmentVariables {
e2eTestStudentStatus: string;
e2eTestApplicationExceptionStatus: ApplicationExceptionStatus;
e2ePIRStatus: ProgramInfoStatus;
}

const fakeWorkers: ZBWorkerConfig<FakeAssessmentVariables, unknown, unknown>[] =
[
{
taskType: "associate-workflow-instance",
taskHandler: (job) => job.complete(),
},
{
taskType: "save-disbursement-schedules",
taskHandler: (job) => job.complete(),
},
{ taskType: "save-assessment-data", taskHandler: (job) => job.complete() },
{ taskType: "update-noa-status", taskHandler: (job) => job.complete() },
{
taskType: "load-assessment-consolidated-data",
taskHandler: (job) =>
job.complete(getMockConsolidatedData(job.variables)),
Copy link
Collaborator

@andrewsignori-aot andrewsignori-aot Mar 21, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In general, what if we allow the assessment workflow to receive the completed mocked object to be returned by the worker?
For instance, if load-assessment-consolidated-data is supposed to return:

{
    "someVariable1": 123,
    "someVariable2": 444,
    "someVariableN": 555,
}

We can start the workflow with the payload as:

{
    "assessmentId": 1,
    "e2eLoadAssessmentConsolidatedDataResult": {
        "someVariable1": 123,
        "someVariable2": 444,
        "someVariableN": 555,
    }
}

The work from the worker method would be just to return the workflow variable e2eLoadAssessmentConsolidatedDataResult, thoughts?
In this example, we can still use the getMockConsolidatedData to support the data creation, but this would be part of the Arrange area of each test as needed.

The only point will be how we can handle mocks for jobs that are reused, for instance, income verification for the student and his parents. In this scenario, the job probably has some information about the id of the invoked worker task that can be used to differentiate one from another.

},
{
taskType: "update-application-status",
taskHandler: (job) => job.complete(),
},
{
taskType: "verify-application-exceptions",
taskHandler: (job) => job.complete(),
},
{
taskType: "program-info-request",
taskHandler: (job) => job.complete(),
},
{
taskType: "create-income-request",
taskHandler: (job) => {
new ZBClient().publishMessage({
name: "income-verified",
correlationKey: "1",
variables: {},
timeToLive: Duration.seconds.of(60),
});
return job.complete({
incomeVerificationCompleted: true,
incomeVerificationId: 1,
});
},
},
{
taskType: "check-income-request",
taskHandler: (job) => job.complete(),
},
{
taskType: "associate-msfaa",
taskHandler: (job) => job.complete(),
},
];

export function getMockConsolidatedData(
jobVariables?: FakeAssessmentVariables,
): Partial<AssessmentConsolidatedData> {
if (!jobVariables) {
return;
}
const consolidatedData = {} as AssessmentConsolidatedData;
if (jobVariables.e2eTestStudentStatus === "independentSingleStudent") {
consolidatedData.studentDataDependantstatus = "independant";
consolidatedData.studentDataRelationshipStatus = "single";
consolidatedData.studentDataTaxReturnIncome = 40000;
}

if (
jobVariables.e2eTestApplicationExceptionStatus ===
ApplicationExceptionStatus.Approved
) {
consolidatedData.applicationExceptionStatus =
ApplicationExceptionStatus.Approved;
}

if (jobVariables.e2ePIRStatus === ProgramInfoStatus.notRequired) {
consolidatedData.studentDataSelectedOffering = 1;
}

return consolidatedData;
}

export class ZeebeMockedClient {
private static mockedZeebeClient: ZBClient;

static getMockedZeebeInstance() {
if (!ZeebeMockedClient.mockedZeebeClient) {
ZeebeMockedClient.mockedZeebeClient = new ZBClient();
fakeWorkers.forEach((fakeWorker) =>
ZeebeMockedClient.mockedZeebeClient.createWorker(fakeWorker),
);
}
return ZeebeMockedClient.mockedZeebeClient;
}
}
2 changes: 1 addition & 1 deletion sources/tests/workflow-docker-compose.yml
Original file line number Diff line number Diff line change
@@ -5,7 +5,7 @@ services:
environment:
- ZEEBE_BROKER_DATA_DISKUSAGECOMMANDWATERMARK=0.998
- ZEEBE_BROKER_DATA_DISKUSAGEREPLICATIONWATERMARK=0.999
- "JAVA_TOOL_OPTIONS=-Xms256m -Xmx256m"
- "JAVA_TOOL_OPTIONS=-Xms512m -Xmx512m"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it to reduce the memory consumption on the dev machine or GitHub action machines?
Can you please clarify which was the motivation around it?

Copy link
Collaborator Author

@dheepak-aot dheepak-aot Mar 22, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When I created the docker-compose exclusively for testing, provided 256m to keep it light. But considering the number of workflow scenarios now tested and will be tested in future, increased it to 512m to ensure stability.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the other PR I would comment on that. I don't know how it was possible to run that with only 256m 😄

restart: always
workflow:
image: workflow-${PROJECT_NAME}:${BUILD_REF}-${BUILD_ID}