Skip to content

Remove the AsyncEventChannels enum #2349

@lampajr

Description

@lampajr

Currently AsyncEventChannels is used to verify async behaviour in our test suite and this is not easy to maintain, especially because we are mixing test code with the main business logic, see as an example:

if (mediator.testMode())
mediator.publishEvent(AsyncEventChannels.DATASET_MISSING_VALUES, dataset.testid, event);
mediator.missingValuesDataset(event);
}
DataPoint.DatasetProcessedEvent event = new DataPoint.DatasetProcessedEvent(DatasetMapper.fromInfo(dataset.getInfo()),
notify);
if (mediator.testMode())
Util.registerTxSynchronization(tm,
txStatus -> mediator.publishEvent(AsyncEventChannels.DATAPOINT_PROCESSED, dataset.testid, event));

We are pushing events to the bus just for testing purposes.

Proposal

As suggested here as well #2348 (comment) get rid of the AsyncEventChannels enum and adapt the test suite without that event bus approach to test async processes.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions