Skip to content

Causality testing API #207

@teivah

Description

@teivah

The quality of the tests must be improved. In my opinion, we must get rid of any single time.Sleep which leads to non-deterministic tests.

As a first proposition, I created this PR: #206

Basically, we can use a DSL this way:

observables := mockObservables(t, `
1
	2
3
	4
x
	x
`)

Each column represents an observable emitting item. The first observable will produce the items 1, 3 and will close (x) whereas the second observable will produce the items 2, 4 and will close.

This code will produce observables from which iterating over the internal iterator where causality is guaranteed. It means 1 will be handled before 2, 2 before 3 etc. regardless of the execution context. It is also possible to send an error item with the character e.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions