Andy Spitzer wrote: > Woof! > > On Mon, 20 Oct 2008 08:30:44 -0400, Arjun Nair <[EMAIL PROTECTED]> wrote: > >> Dale Worley wrote: >>> I was looking at the annoying problem with SipSrvLookupTest... > > The cool thing about Pseudo-random number generators is that they can > always return the same sequence of "random" numbers given the same seed. > > One way to have a repeatable test is to always "seed" the random number > generator with the exact same value before each run. Then, while the > code still calls rand(), it's output is totatally predictable. >
That's what is being done now in SipSrvLookupTest. The problem is, due to recent changes in the Lookup code, the queries are now being carried out in parallel. So, we have no guarantee that the SRV_UDP query will finish before the SRV_TCP query etc., hence the scores assigned to the query results (using rand()) cannot be predicted. Whereas before, we used to carry out the queries one after the other, hence using a pre-determined seed, we could accurately predict the scores assigned to each result. Arjun _______________________________________________ sipx-dev mailing list [email protected] List Archive: http://list.sipfoundry.org/archive/sipx-dev Unsubscribe: http://list.sipfoundry.org/mailman/listinfo/sipx-dev
