Skip to content
This repository was archived by the owner on Apr 22, 2023. It is now read-only.
This repository was archived by the owner on Apr 22, 2023. It is now read-only.

test/simple/test-child-process-fork-dgram.js is broken on SmartOS #8046

Closed

Description

@misterdjules

Actually, it seems we're just lucky that it works on any platform. It's possible that either only the child or the master will handle UDP messages. That what happens on SmartOS. PR #8045 fixes the issue currently, but it's some band-aid on a test waiting to break.

I'll rephrase what I included in the PR's description:

What are we trying to test with this test case? Do we absolutely need both the child and the parent to always handle UDP messages? Could we remove the UDP 'message' event handler as soon as we receive one dgram in the child or the master, so that the one that did not receive a message yet will be the only one that can receive it? This would guarantee (well, as much as UDP can guarantee anything...) that both processes will receive at least one message.

Activity

  1. tjfontaine commented on Aug 6, 2014

    @tjfontaine

    I think the right solution here is not to rely on a number of messages, since it's clear that the parent or child may be what gets the message. Instead let the test run until the child receives at least one message and then inform the parent to shutdown.

    This means that when debugging this test individually it will appear to hang (in the case that things have gone wrong) but when run within the test suite the test runner will kill it after its timeout is hit (generally 60 seconds)

  2. added a commit that references this issue on Aug 6, 2014
    e519907
  3. misterdjules commented on Aug 6, 2014

    @misterdjules
    Author

    @tjfontaine PR #8045 ready for review.

  4. added a commit that references this issue on Aug 7, 2014
    b0277f3
  5. added a commit that references this issue on Dec 25, 2014
    5f81615
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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions