Github user blindio commented on the issue:

    https://github.com/apache/jmeter/pull/233
  
    The reason that I do not rely on the seed is because, as I understand it,
    you can count on seed to be consistent within am implementation of random,
    but not across implementations.
    
    Users of 3rd party JVMs may have consistent failures in the unit tests
    because their implementation of Random provides a different distribution
    than those using the Open/Oracle JVM.
    
    Since the intention of the test is to determine if all potential random
    numbers bin correctly, the systematic approach guarantees correct binning.
    
    Furthermore, magic numbers in unit tests should be avoided if at all
    possible.
    
    -Thorson
    
    On Nov 12, 2016 11:33 PM, "Vladimir Sitnikov" <notificati...@github.com>
    wrote:
    
    > *@vlsi* commented on this pull request.
    > ------------------------------
    >
    > In src/components/org/apache/jmeter/control/WeightedDistributionController
    > .java
    > <https://github.com/apache/jmeter/pull/233#pullrequestreview-8310668>:
    >
    > > +            } else if (currSubCtrl instanceof TestElement) {
    > +                nextSubController = (TestElement) currSubCtrl;
    > +            }
    > +
    > +            if (!(nextSubController.isEnabled()) && (nextSubController 
instanceof Controller || nextSubController instanceof Sampler)) {
    > +                setNextSubController();
    > +            }
    > +        } else {
    > +            nextSubController = null;
    > +        }
    > +    }
    > +}
    > +
    > +/**
    > + * This abstraction is necessary for unit tests, in which case a 
deterministic
    > + * generator replaces the random one
    >
    > Why can't seed be used in order to make test consistent?
    > There are at least two ways:
    > 1) Hard-code seed value right into the test
    > 2) Use random seed, and enable configuring the seed from the command line.
    > That way if a test with some specific seed value fails, we can reproduce 
it
    > by supplying that particular value.
    >
    > —
    > You are receiving this because you were mentioned.
    > Reply to this email directly, view it on GitHub
    > <https://github.com/apache/jmeter/pull/233#pullrequestreview-8310668>, or 
mute
    > the thread
    > 
<https://github.com/notifications/unsubscribe-auth/AGA4ZdY5iHAy5B2rz84YFWBlGCkstdOlks5q9r1LgaJpZM4KaUrV>
    > .
    >



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to