You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@deltacloud.apache.org by Sang-Min Park <sa...@eucalyptus.com> on 2011/04/19 00:18:10 UTC

cucumber test hangs?

Hi all,

Today I tried to run the available cucumber tests.
While the test for SBC passes, the test for EC2 and Mock just spins and eat
up memory.
Specifically, it hangs after this line:

 Scenario: Filtering images by
architecture                                     #
../tests/ec2/hardware_profiles.feature:23
     Given URI /api/hardware_profiles
exists                                      #
/home/sang-min/dcloud/tests/ec2/step_definitions/api_steps.rb:1
     And authentification is required for this
URI                                #
/home/sang-min/dcloud/tests/ec2/step_definitions/images_steps.rb:1
     When client access this URI with
parameters:                                 #
/home/sang-min/dcloud/tests/ec2/step_definitions/images_steps.rb:72
      | architecture | i386 |
     Then client should get some
hardware_profiles                                #
/home/sang-min/dcloud/tests/ec2/step_definitions/images_steps.rb:78


Is it just me? Before digging into further, I just wanted to confirm.

Thanks!

Sang-min

Re: cucumber test hangs?

Posted by David Lutterkort <lu...@redhat.com>.
On Mon, 2011-04-18 at 15:57 -0700, David Lutterkort wrote:
> On Mon, 2011-04-18 at 15:18 -0700, Sang-Min Park wrote:
> > Hi all,
> > 
> > Today I tried to run the available cucumber tests.
> > While the test for SBC passes, the test for EC2 and Mock just spins and eat
> > up memory.
> > Specifically, it hangs after this line:
> 
> Strange - for me, 'API_DRIVER=ec2 rake cucumber' passes without a hitch;
> though 'API_DRIVER=ec2 rake features' blows up with
> 
>         /usr/bin/ruby -I "/usr/lib/ruby/gems/1.8/gems/cucumber-0.9.0/lib:lib" "/usr/lib/ruby/gems/1.8/gems/cucumber-0.9.0/bin/cucumber" ../tests/ec2 --format html --out ../tests/tmp/cucumber_ec2.html
>         Name Collision: Method 'to_xs' is already defined in String
>         Error creating formatter: html (RuntimeError)
>         /homes/lutter/.gem/ruby/1.8/gems/builder-2.1.2/lib/builder/xchar.rb:14:in `check_for_name_collision'
>         /homes/lutter/.gem/ruby/1.8/gems/builder-2.1.2/lib/builder/xchar.rb:21
>         /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
>         /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
>         ....

This seems to happen because aws requires activesupport, which in turn
has a bundled copy of builder, that also defines Strong.to_xs ...

David




Re: cucumber test hangs?

Posted by David Lutterkort <lu...@redhat.com>.
On Mon, 2011-04-18 at 15:18 -0700, Sang-Min Park wrote:
> Hi all,
> 
> Today I tried to run the available cucumber tests.
> While the test for SBC passes, the test for EC2 and Mock just spins and eat
> up memory.
> Specifically, it hangs after this line:

Strange - for me, 'API_DRIVER=ec2 rake cucumber' passes without a hitch;
though 'API_DRIVER=ec2 rake features' blows up with

        /usr/bin/ruby -I "/usr/lib/ruby/gems/1.8/gems/cucumber-0.9.0/lib:lib" "/usr/lib/ruby/gems/1.8/gems/cucumber-0.9.0/bin/cucumber" ../tests/ec2 --format html --out ../tests/tmp/cucumber_ec2.html
        Name Collision: Method 'to_xs' is already defined in String
        Error creating formatter: html (RuntimeError)
        /homes/lutter/.gem/ruby/1.8/gems/builder-2.1.2/lib/builder/xchar.rb:14:in `check_for_name_collision'
        /homes/lutter/.gem/ruby/1.8/gems/builder-2.1.2/lib/builder/xchar.rb:21
        /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
        /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
        ....

David



Re: cucumber test hangs?

Posted by Sang-Min Park <sa...@eucalyptus.com>.
I spent some time to figure what the issue is.
There are two problems here --

* cucumber test has few bugs in api_steps.rb.  The definition [Then /^each
([\w\-]+) should have '(.+)' attribute set to '(.+)'$/ do |el, attr, v|] has
no case that handles 'hardware_profile' and 'instance'. So xpath query is
given nil.

* for unknown reason, my system hangs when xpath is given nil.  When it
doesn't hang, then the test passes because the return from xpath has no
element to iterate over and check its value.

I'll work on this a little bit more and send patches if I'm ready.

Sang-min




On Tue, Apr 19, 2011 at 7:37 AM, Michal Fojtik <mf...@redhat.com> wrote:

> On Apr 19, 2011, at 12:18 AM, Sang-Min Park wrote:
>
> Hi,
>
> > Hi all,
> >
> > Today I tried to run the available cucumber tests.
> > While the test for SBC passes, the test for EC2 and Mock just spins and
> eat
> > up memory.
> > Specifically, it hangs after this line:
> >
> > Scenario: Filtering images by
> > architecture                                     #
> > ../tests/ec2/hardware_profiles.feature:23
> >     Given URI /api/hardware_profiles
> > exists                                      #
> > /home/sang-min/dcloud/tests/ec2/step_definitions/api_steps.rb:1
> >     And authentification is required for this
> > URI                                #
> > /home/sang-min/dcloud/tests/ec2/step_definitions/images_steps.rb:1
> >     When client access this URI with
> > parameters:                                 #
> > /home/sang-min/dcloud/tests/ec2/step_definitions/images_steps.rb:72
> >      | architecture | i386 |
> >     Then client should get some
> > hardware_profiles                                #
> > /home/sang-min/dcloud/tests/ec2/step_definitions/images_steps.rb:78
>
> I observed this behavior on particular Ruby versions:
>
> ruby 1.8.7 (2011-02-18 patchlevel 334) [i686-darwin10] - stock Apple Ruby
> cucumber 0.9.2 => It stuck on hardware_profiles (Then client should get
> some hardware_profiles )
>
> ruby 1.8.7 (2011-02-18 patchlevel 334) [i686-darwin10.6.0] - Ruby installed
> from RVM
> cucumber 0.9.2 => It works perfectly
>
> I can't explain this why it happens, but I suspect cucumber is doing
> something wrong
> or is linked in wrong way to some shared library.
>
>  -- Michal
>
> > Is it just me? Before digging into further, I just wanted to confirm.
> >
> > Thanks!
> >
> > Sang-min
>
> ------------------------------------------------------
> Michal Fojtik, mfojtik@redhat.com
> Deltacloud API: http://deltacloud.org
>
>

Re: cucumber test hangs?

Posted by Michal Fojtik <mf...@redhat.com>.
On Apr 19, 2011, at 12:18 AM, Sang-Min Park wrote:

Hi,

> Hi all,
> 
> Today I tried to run the available cucumber tests.
> While the test for SBC passes, the test for EC2 and Mock just spins and eat
> up memory.
> Specifically, it hangs after this line:
> 
> Scenario: Filtering images by
> architecture                                     #
> ../tests/ec2/hardware_profiles.feature:23
>     Given URI /api/hardware_profiles
> exists                                      #
> /home/sang-min/dcloud/tests/ec2/step_definitions/api_steps.rb:1
>     And authentification is required for this
> URI                                #
> /home/sang-min/dcloud/tests/ec2/step_definitions/images_steps.rb:1
>     When client access this URI with
> parameters:                                 #
> /home/sang-min/dcloud/tests/ec2/step_definitions/images_steps.rb:72
>      | architecture | i386 |
>     Then client should get some
> hardware_profiles                                #
> /home/sang-min/dcloud/tests/ec2/step_definitions/images_steps.rb:78

I observed this behavior on particular Ruby versions:

ruby 1.8.7 (2011-02-18 patchlevel 334) [i686-darwin10] - stock Apple Ruby
cucumber 0.9.2 => It stuck on hardware_profiles (Then client should get some hardware_profiles )

ruby 1.8.7 (2011-02-18 patchlevel 334) [i686-darwin10.6.0] - Ruby installed from RVM
cucumber 0.9.2 => It works perfectly 

I can't explain this why it happens, but I suspect cucumber is doing something wrong
or is linked in wrong way to some shared library.

 -- Michal

> Is it just me? Before digging into further, I just wanted to confirm.
> 
> Thanks!
> 
> Sang-min

------------------------------------------------------
Michal Fojtik, mfojtik@redhat.com
Deltacloud API: http://deltacloud.org