deltacloud-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "marios@redhat.com" <mandr...@redhat.com>
Subject Re: [PATCH] Api-tests: wait for instances to leave PENDING state before continuing tests to resolve system reconfiguring failures on fgcp
Date Fri, 25 Jan 2013 07:50:40 GMT
Dies - I can't apply this patch - does it apply cleanly for you against
current git HEAD?

I get:
[marios@name deltacloud]$ git am
/home/marios/Documents/WORK/Patches/Dies/\[PATCH\]\ Api-tests\:\ wait\
for\ instances\ to\ leave\ PENDING\ state\ before\ continuing\ tests\
to\ resolve\ system\ reconfiguring\ failures\ on\ fgcp.eml
Applying: Api-tests: wait for instances to leave PENDING state before
continuing tests to resolve system reconfiguring failures on fgcp
error: patch failed: tests/deltacloud/instances_test.rb:33
error: tests/deltacloud/instances_test.rb: patch does not apply
Patch failed at 0001 Api-tests: wait for instances to leave PENDING
state before continuing tests to resolve system reconfiguring failures
on fgcp
The copy of the patch that failed is found in:

/home/marios/Documents/WORK/NewEclipsey/DCore/deltacloud_git_repo/deltacloud/.git/rebase-apply/patch
When you have resolved this problem run "git am --resolved".
If you would prefer to skip this patch, instead run "git am --skip".
To restore the original branch and stop patching run "git am --abort".
[marios@name deltacloud]$ git am --abort


trying with git apply:

[marios@name deltacloud]$ cat  | git apply
/home/marios/Documents/WORK/Patches/Dies/\[PATCH\]\ Api-tests\:\ wait\
for\ instances\ to\ leave\ PENDING\ state\ before\ continuing\ tests\
to\ resolve\ system\ reconfiguring\ failures\ on\ fgcp.txt
error: patch failed: tests/deltacloud/instances_test.rb:33
error: tests/deltacloud/instances_test.rb: patch does not apply






On 25/01/13 09:41, diesk@fast.au.fujitsu.com wrote:
> From: Dies Koper <diesk@fast.au.fujitsu.com>
> 
> ---
>  tests/deltacloud/instances_test.rb | 28 ++++++++++++++++++++++++++++
>  1 file changed, 28 insertions(+)
> 
> diff --git a/tests/deltacloud/instances_test.rb b/tests/deltacloud/instances_test.rb
> index 9a0a060..19c4edc 100644
> --- a/tests/deltacloud/instances_test.rb
> +++ b/tests/deltacloud/instances_test.rb
> @@ -33,6 +33,13 @@ describe 'Deltacloud API instances collection' do
>      end
>      @@my_instance_id = (res.xml/'instance')[0][:id]
>      @@created_resources[:instances] << @@my_instance_id
> +    #wait for it to come out of pending state so as to not affect
> +    #subsequent tests (such as locked system for fgcp)
> +    for attempts in 0..15
> +      instance_xml = get(INSTANCES + '/' + @@my_instance_id).xml
> +      break if /(RUNNING|STOPPED)/ =~ (instance_xml/'instance/state').text
> +      sleep(10)
> +    end
>    end
>  
>    #stop/destroy the resources we created for the tests
> @@ -182,6 +189,13 @@ puts "CLEANUP attempt finished... resources looks like: #{@@created_resources.in
>      (res.xml/'instance/image').first[:id].must_equal image_id
>      #mark it for stopping after tests run:
>      @@created_resources[:instances] << created_instance_id
> +    #wait for it to come out of pending state so as to not affect
> +    #subsequent tests (such as locked system for fgcp)
> +    for attempts in 0..15
> +      break if /(RUNNING|STOPPED)/ =~ (res.xml/'instance/state').text
> +      sleep(10)
> +      instance_xml = get(INSTANCES + '/' + created_instance_id).xml
> +    end
>    end
>  
>    it 'should allow to create new instance using image and realm' do
> @@ -202,6 +216,13 @@ puts "CLEANUP attempt finished... resources looks like: #{@@created_resources.in
>      (res.xml/'instance/realm').first[:id].must_equal realm_id
>      #mark it for stopping after tests run:
>      @@created_resources[:instances] << created_instance_id
> +    #wait for it to come out of pending state so as to not affect
> +    #subsequent tests (such as locked system for fgcp)
> +    for attempts in 0..15
> +      break if /(RUNNING|STOPPED)/ =~ (res.xml/'instance/state').text
> +      sleep(10)
> +      instance_xml = get(INSTANCES + '/' + created_instance_id).xml
> +    end
>    end
>  
>    it 'should allow to create new instance using image, realm and hardware_profile' do
> @@ -232,6 +253,13 @@ puts "CLEANUP attempt finished... resources looks like: #{@@created_resources.in
>      (res.xml/'instance/hardware_profile').first[:id].must_equal hwp_id
>      #mark it for stopping after tests run:
>      @@created_resources[:instances] << created_instance_id
> +    #wait for it to come out of pending state so as to not affect
> +    #subsequent tests (such as locked system for fgcp)
> +    for attempts in 0..15
> +      break if /(RUNNING|STOPPED)/ =~ (res.xml/'instance/state').text
> +      sleep(10)
> +      instance_xml = get(INSTANCES + '/' + created_instance_id).xml
> +    end
>    end
>  
>  #snapshot (make image)
> 


Mime
View raw message