Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

chore: add README to clock testing#13583

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
spikecurtis merged 1 commit intomainfromspike/clock-testing-readme
Jun 18, 2024

Conversation

spikecurtis
Copy link
Contributor

@spikecurtisspikecurtis commentedJun 17, 2024
edited
Loading

Adds README with some draft content explaining why the library exists. Will be most relevant when we spin out into a standalone library.

@spikecurtisGraphite App
Copy link
ContributorAuthor

This stack of pull requests is managed by Graphite.Learn more about stacking.

Join@spikecurtis and the rest of your teammates onGraphiteGraphite

@spikecurtisspikecurtis marked this pull request as ready for reviewJune 17, 2024 06:08
Copy link
Member

@johnstcnjohnstcn left a comment

Choose a reason for hiding this comment

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

Some minor language nits, otherwise nice writeup!

* [github.com/aspenmesh/tock](https://github.com/aspenmesh/tock)

Quartz shares the high level design of a `Clock` interface that closely resembles the functions in
the `time` standard library, and a "real" clock passes thru to the standard libary in production,
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
the`time` standard library, and a "real" clock passesthru to the standardlibary in production,
the`time` standard library, and a "real" clock passesthrough to the standardlibrary in production,

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

johnstcn reacted with laugh emoji
Comment on lines 9 to 10
Writing good unit tests for components and functions that use the `time` package is difficult, and
several open source libraries exist. In building Quartz, we took some inspiration from
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
Writing good unit tests for components and functions that use the`time` package is difficult,and
several open source libraries exist. In building Quartz, we took some inspiration from
Writing good unit tests for components and functions that use the`time` package is difficult,even though
several open source libraries exist. In building Quartz, we took some inspiration from

Comment on lines 103 to 106
(As an aside, we still support a traditional standard library-style `Ticker`, if you want to keep
your code as close as possible to the standard library, or if you need to use the channel in a
larger `select` block, but in that case you'll have to find some other mechanism to sync tick
processing to your test code.)
Copy link
Member

Choose a reason for hiding this comment

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

Run-on sentence, consider breaking up.

Our high level goal is to write unit tests that

1. execute quickly
2. don't flake
Copy link
Member

Choose a reason for hiding this comment

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

suggestion: avoid colloquialism

Suggested change
2.don't flake
2.execute reliably

Copy link
ContributorAuthor

@spikecurtisspikecurtisJun 17, 2024
edited
Loading

Choose a reason for hiding this comment

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

While arguably "jargon", I think flaky is more precise. It refers to tests that succeed or fail due to uncontrolled randomness.

A test might not be reliable for other reasons, such as not actually testing or asserting the thing it purports to.

johnstcn reacted with thumbs up emoji
For several reasons, this is a tall order when it comes to code that depends on time, and we found
the existing libraries insufficient for our goals.

For tests to execute quickly without flakes, we want to focus on _determinism_: the test should run
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
For tests to execute quicklywithout flakes, we want to focus on_determinism_: the test should run
For tests to execute quicklyand reliably, we want to focus on_determinism_: the test should run

@spikecurtisspikecurtisforce-pushed thespike/clock-testing-readme branch frome4294f1 toba76a30CompareJune 17, 2024 08:11
@spikecurtisspikecurtis merged commit1de023a intomainJun 18, 2024
24 checks passed
@spikecurtisspikecurtis deleted the spike/clock-testing-readme branchJune 18, 2024 06:16
@github-actionsgithub-actionsbot locked and limited conversation to collaboratorsJun 18, 2024
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.
Reviewers

@johnstcnjohnstcnjohnstcn approved these changes

@mafredrimafredriAwaiting requested review from mafredri

@kylecarbskylecarbsAwaiting requested review from kylecarbs

Assignees

@spikecurtisspikecurtis

Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants
@spikecurtis@johnstcn

[8]ページ先頭

©2009-2025 Movatter.jp