feat(examples): enable history tests in most examples #346
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Issue #, if available:
#261
Description of changes:
Generating history files and adding
assertHistoryEventsto all non-callback and non-invoke example tests. All generated histories were created using the testing library using thegenerate-history.tsscript (also added in this PR).Event signatures are matching with the backend, while all histories were generated by the testing library. This means the testing library and backend have full history parity! (in terms of the examples that we have, and the event types generated - possibly not the event details yet)
Currently, all tests are logging a warning if the history isn't generated yet.
Limitations
The local runner history results do not match exactly in cases when skipTime is enabled. In particular, the number of invocations will often not be the same when running with skipTime, since the checkpoint response will instantly return the timer result, and the invocation doesn't need to exit. For tests with skipTime enabled, I have disabled InvocationCompleted assertions when running in local mode.
Additionally, some situations result in more retries when skipTime is enabled, since retries completely instantly. I have disabled skipTime in those cases (just the promise-any test).
Next steps
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.