Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Speed up tests by reusing temporary classes/modules #206

Merged
merged 2 commits into from Aug 25, 2021
Merged

Conversation

JacobEvelyn
Copy link
Member

@JacobEvelyn JacobEvelyn commented Aug 11, 2021

Fixes #202

NOTE: I'm not sure if this is a good idea but it does make our tests much faster.

Before merging:

  • Copy the table printed at the end of the latest benchmark results into the README.md and update this PR
  • If this change merits an update to CHANGELOG.md, add an entry following Keep a Changelog guidelines with semantic versioning

@codecov
Copy link

codecov bot commented Aug 11, 2021

Codecov Report

Merging #206 (0727842) into main (7af470b) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##              main      #206   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            2         2           
  Lines          173       173           
=========================================
  Hits           173       173           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7af470b...0727842. Read the comment docs.

@@ -13,4 +15,6 @@ class << self
end
end
end

let(:module_with_memo) { @_module_with_memo } # rubocop:disable RSpec/InstanceVariable
Copy link
Contributor

Choose a reason for hiding this comment

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

Does module_with_memo need the same Module-level resetting of state that the class_with_memo needed?

Copy link
Member Author

Choose a reason for hiding this comment

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

I haven't looked into why, but it does not.

Copy link
Contributor

@ms-ati ms-ati left a comment

Choose a reason for hiding this comment

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

LGTM, I left one commit suggestion with a comment line you might want to consider adding to make the "reset counters to 0" test code more understandable

Co-authored-by: Marc Siegel <msiegel@panoramaed.com>
@JacobEvelyn JacobEvelyn merged commit 6914308 into main Aug 25, 2021
@JacobEvelyn JacobEvelyn deleted the faster-tests branch August 25, 2021 13:20
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.

Investigate whether we can speed up tests
3 participants