镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

Port/Duplicate async_hooks tests to use AsyncLocalStore #55712

Description

@Flarna

Short after #55552 was merged I notices that this resulted in loosing a lot test for AsyncLocalStore.

Before AsyncLocalStore was based on async hooks. There are plenty of tests for async hooks which implict verified that AsyncLocalStore does what it is expected.

But since #55552 AsyncLocalStore and async hooks are independent.

I don't think we have to dup them all, but there are some special cases at least in HTTP area (e.g. here) which might require followups.

fyi @nodejs/diagnostics

Edit 21.11.: corrected link to PR

Activity

  1. changed the title [-]Port/Duplicte async_hooks tests to AsyncLocalStore[/-] [+]Port/Duplicate async_hooks tests to use AsyncLocalStore[/+] on Nov 6, 2024
  2. added
    diag-agendaIssues and PRs to discuss during Diagnostics Working Group meetings.
    on Nov 21, 2024
  3. Qard commented on Nov 21, 2024

    @Qard
    Member

    #54879 got merged? It looks like it was just closed to wait for v24.

    In any case, I've added the drag-agenda label. Let's discuss this in more detail in the next diagnostics working group call. (Not the one today...probably a bit short notice for that.)

  4. Flarna commented on Nov 21, 2024

    @Flarna
    MemberAuthor

    No it wasn't. Will reopen for 24 at some time.

    Anyhow, just noticed that I linked the wrong PR. It is about yours which was merged a while ago: #55552 That one changes internal how ALS works and relying on AsyncHooks tests is no longer applicable.

  5. Qard commented on Nov 25, 2024

    @Qard
    Member

    It swaps the default for the flag, but all tests with the test-async-local-storage- prefix are run both with and without he changes, so test coverage should remain the same.

  6. Flarna commented on Nov 26, 2024

    @Flarna
    MemberAuthor

    Yes, they run with both. I'm talking more about the tests which don't have the test-async-local-storage- prefix.
    e.g. test-crypto-randomBytes verifies init/before/after/destroy for async-hooks and as long as this test works an async hooks based ALS will likely work fine.
    or test-async-exec-resource-http-32060 which has also no variant using test-async-local-storage- prefix therefore ALS coverage for that case is lost.

  7. Qard commented on Nov 29, 2024

    @Qard
    Member

    Ah, well if there's things which are testing ALS-related behaviour that aren't actually marked as such then there should probably be some tests specific to ALS for those scenarios.

  8. github-actions commented on Apr 26, 2026

    @github-actions
    Contributor

    This issue has been marked as stale due to 210 days of inactivity.
    It will be automatically closed in 30 days if no further activity occurs. If this is still relevant, please leave a comment or update it to keep it open.

  9. added
    staleIssues and PRs marked stale due to inactivity and scheduled for automatic closure.
    on Apr 26, 2026
  10. github-actions commented on May 26, 2026

    @github-actions
    Contributor

    This issue has been automatically closed after 30 days of inactivity following its stale status (no activity for a total of 240 days).
    If this is still relevant, feel free to reopen it or leave a comment with additional details so we can continue the discussion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    async_local_storageIssues and PRs related to the AsyncLocalStorage API.diag-agendaIssues and PRs to discuss during Diagnostics Working Group meetings.staleIssues and PRs marked stale due to inactivity and scheduled for automatic closure.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions