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

Refactor int64 timeout to time.Duration #1035

Merged
merged 6 commits into from
Sep 18, 2023
Merged

Commits on Sep 18, 2023

  1. Fix the timeout conversion so it's consistent

    The timeout is assumed to be in milliseconds when the user sets it
    using the provided APIs on browserContext and page. The issue is that
    internally it's assumed to be seconds.
    
    This commit fixes that for the default navigation so it's always
    assumed to be milliseconds.
    ankur22 committed Sep 18, 2023
    Configuration menu
    Copy the full SHA
    8882372 View commit details
    Browse the repository at this point in the history
  2. Fix the timeout conversion so it's consistent

    The timeout is assumed to be in milliseconds when the user sets it
    using the provided APIs on browserContext and page. The issue is that
    internally it's assumed to be seconds.
    
    This commit fixes that for the default timeout so it's always
    assumed to be milliseconds.
    ankur22 committed Sep 18, 2023
    Configuration menu
    Copy the full SHA
    f6eae4d View commit details
    Browse the repository at this point in the history
  3. Refactor navigation timeout to time duration

    We should try to work with time duration across most of the codebase.
    The only place where it could be an int64 is when the module receives
    a millisecond value in int64.
    ankur22 committed Sep 18, 2023
    Configuration menu
    Copy the full SHA
    ec7e2be View commit details
    Browse the repository at this point in the history
  4. Refactor set navigation timeout with duration

    time.Duration should be used throughout the codebase instead of int64.
    This change ensures that in64 is quickly converted to a time.Duration
    which means we have to care less about whether the in64 is in seconds
    or milliseconds etc.
    ankur22 committed Sep 18, 2023
    Configuration menu
    Copy the full SHA
    7d3ed23 View commit details
    Browse the repository at this point in the history
  5. Refactor timeout to time.Duration

    We should be working with time.Duration throughout the code base
    instead of trying to work out what int64 means. This change aligns the
    default timeout to this aim.
    ankur22 committed Sep 18, 2023
    Configuration menu
    Copy the full SHA
    128d933 View commit details
    Browse the repository at this point in the history
  6. Refactor integration test to run faster

    We can reduce the sleep time on the timeout integration tests since
    the timeout is now not being confused between milliseconds and seconds.
    ankur22 committed Sep 18, 2023
    Configuration menu
    Copy the full SHA
    1826aaf View commit details
    Browse the repository at this point in the history