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

[ST-1312] Added dynamic loading support #205

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

[ST-1312] Added dynamic loading support #205

wants to merge 4 commits into from

Conversation

zeyuwu
Copy link
Contributor

@zeyuwu zeyuwu commented Mar 14, 2022

Purpose/goal of Pull Request (Issue #)

https://wovnio.atlassian.net/browse/ST-1312

Comments

  • send user-agent to html-swapper
  • add a time-stamp to search engine bot requests that changes every 20 minutes

Comment on lines 15 to 16
current_time = Time.now.utc.sec
assert((TimeUtil.time_proc.call - current_time) < 2.0)
Copy link
Contributor

Choose a reason for hiding this comment

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

this test doesn't look useful. There's not any logic here, it is just a wrapper for Time.now so i don't think you need to test it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes this test might seem very redundant. But this is the only check that makes sure the time_proc is usable (we mocked it in all other tests). It's basically to make sure 1) the proc is actually callable and it is a proc and 2) it's not returning something totally unexpected (like a datetime object for example)

Copy link
Contributor

Choose a reason for hiding this comment

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

Timecop would still be useful if you wanted to write this more strictly 😉

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I removed time_proc and tested with Timecop.

Copy link
Contributor

@Soichiro725 Soichiro725 left a comment

Choose a reason for hiding this comment

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

Looks good.

@zeyuwu zeyuwu added the hold label May 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants