Patchwork [1,of,3,stable,v2] discovery: test coverage for 3ef893520a85 issues

login
register
mail settings
Submitter Mads Kiilerich
Date Nov. 5, 2014, 5:38 p.m.
Message ID <e0d9986516e06dc2b9cd.1415209092@ssl.google-analytics.com>
Download mbox | patch
Permalink /patch/6584/
State Not Applicable
Headers show

Comments

Mads Kiilerich - Nov. 5, 2014, 5:38 p.m.
# HG changeset patch
# User Mads Kiilerich <madski@unity3d.com>
# Date 1415208017 -3600
#      Wed Nov 05 18:20:17 2014 +0100
# Branch stable
# Node ID e0d9986516e06dc2b9cd8288c461d434b8a5f8dd
# Parent  a3c2d92112948b2fa1ac3881920ac4d932cda6c8
discovery: test coverage for 3ef893520a85 issues
Matt Mackall - Nov. 5, 2014, 5:53 p.m.
On Wed, 2014-11-05 at 18:38 +0100, Mads Kiilerich wrote:
> # HG changeset patch
> # User Mads Kiilerich <madski@unity3d.com>
> # Date 1415208017 -3600
> #      Wed Nov 05 18:20:17 2014 +0100
> # Branch stable
> # Node ID e0d9986516e06dc2b9cd8288c461d434b8a5f8dd
> # Parent  a3c2d92112948b2fa1ac3881920ac4d932cda6c8
> discovery: test coverage for 3ef893520a85 issues
> 
> diff --git a/tests/test-setdiscovery.t b/tests/test-setdiscovery.t
> --- a/tests/test-setdiscovery.t
> +++ b/tests/test-setdiscovery.t
> @@ -357,3 +357,42 @@ Test actual protocol when pulling one ne
>    $ cat errors.log
>  
>    $ cd ..
> +
> +
> +Issue 4438 - test coverage for 3ef893520a85 issues.
> +
> +  $ mkdir 3ef893520a85
> +  $ cd 3ef893520a85
> +  $ hg init t0
> +  $ for i in `seq 101`; do hg -R t0 up -qr null; hg -R t0 branch -q b$i; hg -R t0 ci -qmb$i; done
> +  $ hg clone -q t0 t1
> +  $ for i in `seq 101`; do hg -R t0 up -qr null; hg -R t0 branch -q c$i; hg -R t0 ci -qmc$i; done
> +  $ hg -R t1 branch -q o2 && hg -R t1 ci -qmo2

You're a few minutes late, as v1 is already published.

It's great that you've got a test for this, but I'm more than a little
worried about how much this test case costs. Candidate for being stored
as a pre-built bundle, perhaps?
Mads Kiilerich - Nov. 5, 2014, 5:54 p.m.
On 11/05/2014 06:53 PM, Matt Mackall wrote:
> On Wed, 2014-11-05 at 18:38 +0100, Mads Kiilerich wrote:
>> # HG changeset patch
>> # User Mads Kiilerich <madski@unity3d.com>
>> # Date 1415208017 -3600
>> #      Wed Nov 05 18:20:17 2014 +0100
>> # Branch stable
>> # Node ID e0d9986516e06dc2b9cd8288c461d434b8a5f8dd
>> # Parent  a3c2d92112948b2fa1ac3881920ac4d932cda6c8
>> discovery: test coverage for 3ef893520a85 issues
>>
>> diff --git a/tests/test-setdiscovery.t b/tests/test-setdiscovery.t
>> --- a/tests/test-setdiscovery.t
>> +++ b/tests/test-setdiscovery.t
>> @@ -357,3 +357,42 @@ Test actual protocol when pulling one ne
>>     $ cat errors.log
>>   
>>     $ cd ..
>> +
>> +
>> +Issue 4438 - test coverage for 3ef893520a85 issues.
>> +
>> +  $ mkdir 3ef893520a85
>> +  $ cd 3ef893520a85
>> +  $ hg init t0
>> +  $ for i in `seq 101`; do hg -R t0 up -qr null; hg -R t0 branch -q b$i; hg -R t0 ci -qmb$i; done
>> +  $ hg clone -q t0 t1
>> +  $ for i in `seq 101`; do hg -R t0 up -qr null; hg -R t0 branch -q c$i; hg -R t0 ci -qmc$i; done
>> +  $ hg -R t1 branch -q o2 && hg -R t1 ci -qmo2
> You're a few minutes late, as v1 is already published.

It seems like no push notification mail has been sent?

/Mads

Patch

diff --git a/tests/test-setdiscovery.t b/tests/test-setdiscovery.t
--- a/tests/test-setdiscovery.t
+++ b/tests/test-setdiscovery.t
@@ -357,3 +357,42 @@  Test actual protocol when pulling one ne
   $ cat errors.log
 
   $ cd ..
+
+
+Issue 4438 - test coverage for 3ef893520a85 issues.
+
+  $ mkdir 3ef893520a85
+  $ cd 3ef893520a85
+  $ hg init t0
+  $ for i in `seq 101`; do hg -R t0 up -qr null; hg -R t0 branch -q b$i; hg -R t0 ci -qmb$i; done
+  $ hg clone -q t0 t1
+  $ for i in `seq 101`; do hg -R t0 up -qr null; hg -R t0 branch -q c$i; hg -R t0 ci -qmc$i; done
+  $ hg -R t1 branch -q o2 && hg -R t1 ci -qmo2
+
+Set iteration order can cause wrong and unstable results:
+
+  $ hg -R t0 outgoing t1 -T'{rev} '
+  comparing with t1
+  searching for changes
+  * (glob)
+
+Full initialsamplesize of samples is already common:
+
+  $ cat >> $TESTTMP/unrandomsample.py << EOF
+  > import random
+  > def sample(population, k):
+  >     return sorted(population)[:k]
+  > random.sample = sample
+  > EOF
+
+  $ cat >> t0/.hg/hgrc << EOF
+  > [extensions]
+  > unrandomsample = $TESTTMP/unrandomsample.py
+  > EOF
+
+  $ hg -R t0 outgoing t1 -T'{rev} '
+  comparing with t1
+  searching for changes
+  no changes found
+  [1]
+  $ cd ..