Skip to content

Conversation

teivah
Copy link
Member

@teivah teivah commented Jun 25, 2019

Implementation of a causality testing API based on a DSL. For example:

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 does guarantee sequentiality. It means 1 will be handled before 2, 2 before 3 etc. regardless of the execution context.

This allows us to get rid of time.Sleep in some tests which leads to deterministic tests.

Last but not least, sending an item e in the DSL creates pushes an error item.

@coveralls
Copy link

coveralls commented Jun 25, 2019

Pull Request Test Coverage Report for Build 433

  • 16 of 18 (88.89%) changed or added relevant lines in 3 files are covered.
  • 1 unchanged line in 1 file lost coverage.
  • Overall coverage increased (+2.9%) to 84.765%

Changes Missing Coverage Covered Lines Changed/Added Lines %
connectableobservable.go 0 2 0.0%
Files with Coverage Reduction New Missed Lines %
connectableobservable.go 1 18.03%
Totals Coverage Status
Change from base Build 430: 2.9%
Covered Lines: 2042
Relevant Lines: 2409

💛 - Coveralls

@teivah teivah merged commit 7edefca into v2 Jun 25, 2019
@teivah teivah mentioned this pull request Jun 25, 2019
@teivah teivah deleted the mock branch June 25, 2019 22:52
@teivah teivah mentioned this pull request Jun 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants