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

Fix bug where domains aren't re-entered when handlers are executed #110

Merged
merged 7 commits into from
Nov 25, 2024

Commits on Nov 22, 2024

  1. Fix test that should've been broken all along!

    It's the one labeled "This tests if promise domain
    membership infects subscriptions made in handlers."
    
    The inner handler wasn't ever executing, due to
    some kind of circularity I think. Not sure. Now it's
    executing but not with the right promise domain
    (meaning promise domain reentry isn't happening).
    jcheng5 committed Nov 22, 2024
    Configuration menu
    Copy the full SHA
    f981e28 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    a78153c View commit details
    Browse the repository at this point in the history
  3. Re-enter domains when handlers are called

    When a handler is subscribed to a promise (using then()
    or similar) and a promise domain is active, then when
    the handler is invoked, the promise domain should be
    made active again. This allows the domain to "infect"
    handlers that are registered later, but in the same
    scope.
    jcheng5 committed Nov 22, 2024
    Configuration menu
    Copy the full SHA
    d42057c View commit details
    Browse the repository at this point in the history

Commits on Nov 25, 2024

  1. Make tests actually detect errors/assertions in handlers

    Previously, some tests were promise-chaining handlers containing
    testthat assertions, and then calling wait_for_it(). This would
    cause those assertions to be printed but not treated as test
    failures, because wait_for_it() doesn't error on unhandled
    promise errors. With this change, wait_for_it() takes a promise
    and will raise an error if the promise rejects.
    
    The bigger part of the commit is revisiting all the existing
    uses of wait_for_it() and passing in promises if appropriate.
    jcheng5 committed Nov 25, 2024
    Configuration menu
    Copy the full SHA
    e5e3fdb View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    942275f View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    44ff6fe View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    6fda65c View commit details
    Browse the repository at this point in the history