Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Catalyst: Dev

Catalyst test suite

 

 

First page Previous page 1 2 Next page Last page  View All Catalyst dev RSS feed   Index | Next | Previous | View Threaded


yuris at juniper

May 5, 2008, 4:48 PM

Post #1 of 28 (7581 views)
Permalink
Catalyst test suite

Hi,

I am contemplating to write a new Catalyst::Engine subclass. A looked at
the test suite of an existing module ( Catalyst::Engine::HTTP::POE) and
discovered a lot of *.pm and testapp_poe.pl. I could not run it since
some modules were missing (like +TestApp::Plugin::FullyQualified).

The POD also referred to this module passing "the Catalyst test suite".

Am I missing something needed to develop and test Catalyst::Engine? How
do I get and use the test suite?

--
YS


_______________________________________________
Catalyst-dev mailing list
Catalyst-dev [at] lists
http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst-dev


jon at jrock

May 5, 2008, 4:56 PM

Post #2 of 28 (7412 views)
Permalink
Re: Catalyst test suite [In reply to]

* On Mon, May 05 2008, Yuri Shtil wrote:
> Hi,
>
> I am contemplating to write a new Catalyst::Engine subclass. A looked
> at the test suite of an existing module ( Catalyst::Engine::HTTP::POE)
> and discovered a lot of *.pm and testapp_poe.pl. I could not run it
> since some modules were missing (like
> +TestApp::Plugin::FullyQualified).

The test stuff is in t/lib. TestApp::Plugin::FullyQualified is no
exception.

>
> The POD also referred to this module passing "the Catalyst test suite".
>
> Am I missing something needed to develop and test Catalyst::Engine?
> How do I get and use the test suite?

In a working copy of the Catalyst source code, something like:

CATALYST_ENGINE="Your::Engine" make test

Regards,
Jonathan Rockway

--
print just => another => perl => hacker => if $,=$"

_______________________________________________
Catalyst-dev mailing list
Catalyst-dev [at] lists
http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst-dev


andy at hybridized

May 5, 2008, 7:58 PM

Post #3 of 28 (7407 views)
Permalink
Re: Catalyst test suite [In reply to]

On May 5, 2008, at 7:48 PM, Yuri Shtil wrote:

> Hi,
>
> I am contemplating to write a new Catalyst::Engine subclass. A
> looked at the test suite of an existing module
> ( Catalyst::Engine::HTTP::POE) and discovered a lot of *.pm and
> testapp_poe.pl. I could not run it since some modules were missing
> (like +TestApp::Plugin::FullyQualified).
>
> The POD also referred to this module passing "the Catalyst test
> suite".
>
> Am I missing something needed to develop and test Catalyst::Engine?
> How do I get and use the test suite?

Hi,

The Catalyst test suite for engines consists of the t/live_* files.
There are several ways to run these tests against your engine.

If your engine can be scripted to run automatically, you can write a
wrapper script that launches the engine and runs all the tests against
it. For an example of this see t/optional_http-server.t.

You can manually run tests against your engine by setting the
CATALYST_SERVER env var to the URI where your engine is running. Then
any Catalyst tests you run will run against that host. This is very
helpful for debugging a single failing test. Note that your engine
must be running the TestApp, which just means you need to copy t/lib/*
into an app.

-Andy

_______________________________________________
Catalyst-dev mailing list
Catalyst-dev [at] lists
http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst-dev


yuris at juniper

May 6, 2008, 8:23 AM

Post #4 of 28 (7392 views)
Permalink
Re: Catalyst test suite [In reply to]

Hi Andy,
I was trying to run t/optional_http-server.t. as you advised and got:

Couldn't load plugin "Catalyst::Plugin::+TestApp::Plugin::FullyQualified

What is this plus?

Andy Grundman wrote:
>
> On May 5, 2008, at 7:48 PM, Yuri Shtil wrote:
>
>> Hi,
>>
>> I am contemplating to write a new Catalyst::Engine subclass. A looked
>> at the test suite of an existing module (
>> Catalyst::Engine::HTTP::POE) and discovered a lot of *.pm and
>> testapp_poe.pl. I could not run it since some modules were missing
>> (like +TestApp::Plugin::FullyQualified).
>>
>> The POD also referred to this module passing "the Catalyst test suite".
>>
>> Am I missing something needed to develop and test Catalyst::Engine?
>> How do I get and use the test suite?
>
> Hi,
>
> The Catalyst test suite for engines consists of the t/live_* files.
> There are several ways to run these tests against your engine.
>
> If your engine can be scripted to run automatically, you can write a
> wrapper script that launches the engine and runs all the tests against
> it. For an example of this see t/optional_http-server.t.
>
> You can manually run tests against your engine by setting the
> CATALYST_SERVER env var to the URI where your engine is running. Then
> any Catalyst tests you run will run against that host. This is very
> helpful for debugging a single failing test. Note that your engine
> must be running the TestApp, which just means you need to copy t/lib/*
> into an app.
>
> -Andy
>
> _______________________________________________
> Catalyst-dev mailing list
> Catalyst-dev [at] lists
> http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst-dev

_______________________________________________
Catalyst-dev mailing list
Catalyst-dev [at] lists
http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst-dev


andy at hybridized

May 6, 2008, 8:28 AM

Post #5 of 28 (7404 views)
Permalink
Re: Catalyst test suite [In reply to]

I just tried it with 5.7 trunk and it worked fine for me.

On May 6, 2008, at 11:23 AM, Yuri Shtil wrote:

> Hi Andy,
> I was trying to run t/optional_http-server.t. as you advised and got:
>
> Couldn't load plugin "Catalyst::Plugin::
> +TestApp::Plugin::FullyQualified
>
> What is this plus?
>
> Andy Grundman wrote:
>>
>> On May 5, 2008, at 7:48 PM, Yuri Shtil wrote:
>>
>>> Hi,
>>>
>>> I am contemplating to write a new Catalyst::Engine subclass. A
>>> looked at the test suite of an existing module
>>> ( Catalyst::Engine::HTTP::POE) and discovered a lot of *.pm and
>>> testapp_poe.pl. I could not run it since some modules were missing
>>> (like +TestApp::Plugin::FullyQualified).
>>>
>>> The POD also referred to this module passing "the Catalyst test
>>> suite".
>>>
>>> Am I missing something needed to develop and test
>>> Catalyst::Engine? How do I get and use the test suite?
>>
>> Hi,
>>
>> The Catalyst test suite for engines consists of the t/live_*
>> files. There are several ways to run these tests against your
>> engine.
>>
>> If your engine can be scripted to run automatically, you can write
>> a wrapper script that launches the engine and runs all the tests
>> against it. For an example of this see t/optional_http-server.t.
>>
>> You can manually run tests against your engine by setting the
>> CATALYST_SERVER env var to the URI where your engine is running.
>> Then any Catalyst tests you run will run against that host. This
>> is very helpful for debugging a single failing test. Note that
>> your engine must be running the TestApp, which just means you need
>> to copy t/lib/* into an app.
>>
>> -Andy
>>





_______________________________________________
Catalyst-dev mailing list
Catalyst-dev [at] lists
http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst-dev


yuris at juniper

May 6, 2008, 9:08 AM

Post #6 of 28 (7404 views)
Permalink
Re: Catalyst test suite [In reply to]

Can you send me the command to fetch the source from the repository?

Andy Grundman wrote:
> I just tried it with 5.7 trunk and it worked fine for me.
>
> On May 6, 2008, at 11:23 AM, Yuri Shtil wrote:
>
>> Hi Andy,
>> I was trying to run t/optional_http-server.t. as you advised and got:
>>
>> Couldn't load plugin "Catalyst::Plugin::+TestApp::Plugin::FullyQualified
>>
>> What is this plus?
>>
>> Andy Grundman wrote:
>>>
>>> On May 5, 2008, at 7:48 PM, Yuri Shtil wrote:
>>>
>>>> Hi,
>>>>
>>>> I am contemplating to write a new Catalyst::Engine subclass. A
>>>> looked at the test suite of an existing module (
>>>> Catalyst::Engine::HTTP::POE) and discovered a lot of *.pm and
>>>> testapp_poe.pl. I could not run it since some modules were missing
>>>> (like +TestApp::Plugin::FullyQualified).
>>>>
>>>> The POD also referred to this module passing "the Catalyst test
>>>> suite".
>>>>
>>>> Am I missing something needed to develop and test Catalyst::Engine?
>>>> How do I get and use the test suite?
>>>
>>> Hi,
>>>
>>> The Catalyst test suite for engines consists of the t/live_* files.
>>> There are several ways to run these tests against your engine.
>>>
>>> If your engine can be scripted to run automatically, you can write a
>>> wrapper script that launches the engine and runs all the tests
>>> against it. For an example of this see t/optional_http-server.t.
>>>
>>> You can manually run tests against your engine by setting the
>>> CATALYST_SERVER env var to the URI where your engine is running.
>>> Then any Catalyst tests you run will run against that host. This is
>>> very helpful for debugging a single failing test. Note that your
>>> engine must be running the TestApp, which just means you need to
>>> copy t/lib/* into an app.
>>>
>>> -Andy
>>>
>
>
>
>
>
> _______________________________________________
> Catalyst-dev mailing list
> Catalyst-dev [at] lists
> http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst-dev

_______________________________________________
Catalyst-dev mailing list
Catalyst-dev [at] lists
http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst-dev


yuris at juniper

May 6, 2008, 9:13 AM

Post #7 of 28 (7407 views)
Permalink
Re: Catalyst test suite [In reply to]

Got it never mind.

Yuri Shtil wrote:
> Can you send me the command to fetch the source from the repository?
>
> Andy Grundman wrote:
>> I just tried it with 5.7 trunk and it worked fine for me.
>>
>> On May 6, 2008, at 11:23 AM, Yuri Shtil wrote:
>>
>>> Hi Andy,
>>> I was trying to run t/optional_http-server.t. as you advised and got:
>>>
>>> Couldn't load plugin
>>> "Catalyst::Plugin::+TestApp::Plugin::FullyQualified
>>>
>>> What is this plus?
>>>
>>> Andy Grundman wrote:
>>>>
>>>> On May 5, 2008, at 7:48 PM, Yuri Shtil wrote:
>>>>
>>>>> Hi,
>>>>>
>>>>> I am contemplating to write a new Catalyst::Engine subclass. A
>>>>> looked at the test suite of an existing module (
>>>>> Catalyst::Engine::HTTP::POE) and discovered a lot of *.pm and
>>>>> testapp_poe.pl. I could not run it since some modules were missing
>>>>> (like +TestApp::Plugin::FullyQualified).
>>>>>
>>>>> The POD also referred to this module passing "the Catalyst test
>>>>> suite".
>>>>>
>>>>> Am I missing something needed to develop and test
>>>>> Catalyst::Engine? How do I get and use the test suite?
>>>>
>>>> Hi,
>>>>
>>>> The Catalyst test suite for engines consists of the t/live_*
>>>> files. There are several ways to run these tests against your engine.
>>>>
>>>> If your engine can be scripted to run automatically, you can write
>>>> a wrapper script that launches the engine and runs all the tests
>>>> against it. For an example of this see t/optional_http-server.t.
>>>>
>>>> You can manually run tests against your engine by setting the
>>>> CATALYST_SERVER env var to the URI where your engine is running.
>>>> Then any Catalyst tests you run will run against that host. This
>>>> is very helpful for debugging a single failing test. Note that
>>>> your engine must be running the TestApp, which just means you need
>>>> to copy t/lib/* into an app.
>>>>
>>>> -Andy
>>>>
>>
>>
>>
>>
>>
>> _______________________________________________
>> Catalyst-dev mailing list
>> Catalyst-dev [at] lists
>> http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst-dev
>
> _______________________________________________
> Catalyst-dev mailing list
> Catalyst-dev [at] lists
> http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst-dev

_______________________________________________
Catalyst-dev mailing list
Catalyst-dev [at] lists
http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst-dev


yuris at juniper

May 6, 2008, 9:41 AM

Post #8 of 28 (7405 views)
Permalink
Re: Catalyst test suite [In reply to]

I just fetched the trunk (am not sure whether it is 5.7) and got the same:

'Couldn\'t load plugin
"Catalyst::Plugin::+TestApp::Plugin::FullyQualified", "Can\'t locate
Catalyst/Plugin/+TestApp/Plugin/FullyQualified.pm in @INC (@INC
contains:
/export/work/CatRepo/trunk/Catalyst-Engine-HTTP-POE/t/tmp/TestApp/script/../lib
/export/work/CatRepo/trunk/Catalyst-Engine-HTTP-POE/t/../lib
/usr/lib/perl5/site_perl/5.8.8/i386-linux-thread-multi
/usr/lib/perl5/site_perl/5.8.7/i386-linux-thread-multi
/usr/lib/perl5/site_perl/5.8.6/i386-linux-thread-multi
/usr/lib/perl5/site_perl/5.8.5/i386-linux-thread-multi
/usr/lib/perl5/site_perl/5.8.8 /usr/lib/perl5/site_perl/5.8.7
/usr/lib/perl5/site_perl/5.8.6 /usr/lib/perl5/site_perl/5.8.5
/usr/lib/perl5/site_perl
/usr/lib/perl5/vendor_perl/5.8.8/i386-linux-thread-multi
/usr/lib/perl5/vendor_perl/5.8.7/i386-linux-thread-multi
/usr/lib/perl5/vendor_perl/5.8.6/i386-linux-thread-multi
/usr/lib/perl5/vendor_perl/5.8.5/i386-linux-thread-multi
/usr/lib/perl5/vendor_perl/5.8.8 /usr/lib/perl5/vendor_perl/5.8.7
/usr/lib/perl5/vendor_perl/5.8.6 /usr/lib/perl5/vendor_perl/5.8.5
/usr/lib/perl5/vendor_perl /usr/lib/perl5/5.8.8/i386-linux-thread-multi
/usr/lib/perl5/5.8.8 .) at /usr/lib/perl5/site_perl/5.8.8/Catalyst.pm
line 1752.

BTW the optional_poe-server.t script goes into an infinite loop, I had
to read the pipe to see this.

What do I miss?

Where does Catalyst::Plugin::+TestApp::Plugin::FullyQualified come from?

Andy Grundman wrote:
> I just tried it with 5.7 trunk and it worked fine for me.
>
> On May 6, 2008, at 11:23 AM, Yuri Shtil wrote:
>
>> Hi Andy,
>> I was trying to run t/optional_http-server.t. as you advised and got:
>>
>> Couldn't load plugin "Catalyst::Plugin::+TestApp::Plugin::FullyQualified
>>
>> What is this plus?
>>
>> Andy Grundman wrote:
>>>
>>> On May 5, 2008, at 7:48 PM, Yuri Shtil wrote:
>>>
>>>> Hi,
>>>>
>>>> I am contemplating to write a new Catalyst::Engine subclass. A
>>>> looked at the test suite of an existing module (
>>>> Catalyst::Engine::HTTP::POE) and discovered a lot of *.pm and
>>>> testapp_poe.pl. I could not run it since some modules were missing
>>>> (like +TestApp::Plugin::FullyQualified).
>>>>
>>>> The POD also referred to this module passing "the Catalyst test
>>>> suite".
>>>>
>>>> Am I missing something needed to develop and test Catalyst::Engine?
>>>> How do I get and use the test suite?
>>>
>>> Hi,
>>>
>>> The Catalyst test suite for engines consists of the t/live_* files.
>>> There are several ways to run these tests against your engine.
>>>
>>> If your engine can be scripted to run automatically, you can write a
>>> wrapper script that launches the engine and runs all the tests
>>> against it. For an example of this see t/optional_http-server.t.
>>>
>>> You can manually run tests against your engine by setting the
>>> CATALYST_SERVER env var to the URI where your engine is running.
>>> Then any Catalyst tests you run will run against that host. This is
>>> very helpful for debugging a single failing test. Note that your
>>> engine must be running the TestApp, which just means you need to
>>> copy t/lib/* into an app.
>>>
>>> -Andy
>>>
>
>
>
>
>
> _______________________________________________
> Catalyst-dev mailing list
> Catalyst-dev [at] lists
> http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst-dev

_______________________________________________
Catalyst-dev mailing list
Catalyst-dev [at] lists
http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst-dev


andy at hybridized

May 6, 2008, 9:46 AM

Post #9 of 28 (7413 views)
Permalink
Re: Catalyst test suite [In reply to]

I guess we weren't testing the same thing... I was running t/
optional_http-server.t not the POE test. BTW, the POE engine is no
longer supported (by me anyway), it's been deprecated in favor of the
HTTP::Prefork engine.

On May 6, 2008, at 12:41 PM, Yuri Shtil wrote:

> I just fetched the trunk (am not sure whether it is 5.7) and got the
> same:
>
> 'Couldn\'t load plugin "Catalyst::Plugin::
> +TestApp::Plugin::FullyQualified", "Can\'t locate Catalyst/Plugin/
> +TestApp/Plugin/FullyQualified.pm in @INC (@INC contains: /export/
> work/CatRepo/trunk/Catalyst-Engine-HTTP-POE/t/tmp/TestApp/script/../
> lib /export/work/CatRepo/trunk/Catalyst-Engine-HTTP-POE/t/../lib /
> usr/lib/perl5/site_perl/5.8.8/i386-linux-thread-multi /usr/lib/perl5/
> site_perl/5.8.7/i386-linux-thread-multi /usr/lib/perl5/site_perl/
> 5.8.6/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.5/i386-
> linux-thread-multi /usr/lib/perl5/site_perl/5.8.8 /usr/lib/perl5/
> site_perl/5.8.7 /usr/lib/perl5/site_perl/5.8.6 /usr/lib/perl5/
> site_perl/5.8.5 /usr/lib/perl5/site_perl /usr/lib/perl5/vendor_perl/
> 5.8.8/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.7/i386-
> linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.6/i386-linux-
> thread-multi /usr/lib/perl5/vendor_perl/5.8.5/i386-linux-thread-
> multi /usr/lib/perl5/vendor_perl/5.8.8 /usr/lib/perl5/vendor_perl/
> 5.8.7 /usr/lib/perl5/vendor_perl/5.8.6 /usr/lib/perl5/vendor_perl/
> 5.8.5 /usr/lib/perl5/vendor_perl /usr/lib/perl5/5.8.8/i386-linux-
> thread-multi /usr/lib/perl5/5.8.8 .) at /usr/lib/perl5/site_perl/
> 5.8.8/Catalyst.pm line 1752.
>
> BTW the optional_poe-server.t script goes into an infinite loop, I
> had to read the pipe to see this.
>
> What do I miss?
>
> Where does Catalyst::Plugin::+TestApp::Plugin::FullyQualified come
> from?
>
> Andy Grundman wrote:
>> I just tried it with 5.7 trunk and it worked fine for me.
>>
>> On May 6, 2008, at 11:23 AM, Yuri Shtil wrote:
>>
>>> Hi Andy,
>>> I was trying to run t/optional_http-server.t. as you advised and
>>> got:
>>>
>>> Couldn't load plugin "Catalyst::Plugin::
>>> +TestApp::Plugin::FullyQualified
>>>
>>> What is this plus?
>>>
>>> Andy Grundman wrote:
>>>>
>>>> On May 5, 2008, at 7:48 PM, Yuri Shtil wrote:
>>>>
>>>>> Hi,
>>>>>
>>>>> I am contemplating to write a new Catalyst::Engine subclass. A
>>>>> looked at the test suite of an existing module
>>>>> ( Catalyst::Engine::HTTP::POE) and discovered a lot of *.pm and
>>>>> testapp_poe.pl. I could not run it since some modules were
>>>>> missing (like +TestApp::Plugin::FullyQualified).
>>>>>
>>>>> The POD also referred to this module passing "the Catalyst test
>>>>> suite".
>>>>>
>>>>> Am I missing something needed to develop and test
>>>>> Catalyst::Engine? How do I get and use the test suite?
>>>>
>>>> Hi,
>>>>
>>>> The Catalyst test suite for engines consists of the t/live_*
>>>> files. There are several ways to run these tests against your
>>>> engine.
>>>>
>>>> If your engine can be scripted to run automatically, you can
>>>> write a wrapper script that launches the engine and runs all the
>>>> tests against it. For an example of this see t/optional_http-
>>>> server.t.
>>>>
>>>> You can manually run tests against your engine by setting the
>>>> CATALYST_SERVER env var to the URI where your engine is running.
>>>> Then any Catalyst tests you run will run against that host. This
>>>> is very helpful for debugging a single failing test. Note that
>>>> your engine must be running the TestApp, which just means you
>>>> need to copy t/lib/* into an app.
>>>>
>>>> -Andy
>>>>
>>





_______________________________________________
Catalyst-dev mailing list
Catalyst-dev [at] lists
http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst-dev


jon at jrock

May 6, 2008, 9:56 AM

Post #10 of 28 (7407 views)
Permalink
Re: Catalyst test suite [In reply to]

* On Tue, May 06 2008, Yuri Shtil wrote:
> I just fetched the trunk (am not sure whether it is 5.7)

5.70 is in the name of the directory; make sure you got the correct
tree:

http://dev.catalyst.perl.org/repos/Catalyst/Catalyst-Runtime/5.70/trunk

I'm not sure why something is trying to load the module with a + in the
name. When you are telling Catalyst which plugins to load, the leading
+ means to not prepend "Catalyst::Plugin::". For example,
"use Catalyst qw(Foo +Bar)" would load two modules,
"Catalyst::Plugin::Foo", and "Bar". The + should never be interpreted
directly.

Anyway, do this. In the working copy, run "perl Makefile.PL" and "make
test". Do the tests pass normally? If not, something is wrong with
your perl or environment. If it works, then everything is OK with
Catalyst. (The problem would be with how you are invoking the tests, or
your own engine code.)

I have a feeling you have an old Catalyst installed and are running the
tests against that. If you want to run an individual test, you need to
say "perl -Ilib t/foo.t", not "perl t/foo.t". That will cause perl to
use the Catalyst in the current directory instead of the installed
version.

Hope this helps.

Regards,
Jonathan Rockway

--
print just => another => perl => hacker => if $,=$"

_______________________________________________
Catalyst-dev mailing list
Catalyst-dev [at] lists
http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst-dev


andy at hybridized

May 6, 2008, 10:03 AM

Post #11 of 28 (7407 views)
Permalink
Re: Catalyst test suite [In reply to]

On May 6, 2008, at 12:56 PM, Jonathan Rockway wrote:
>
> I have a feeling you have an old Catalyst installed and are running
> the
> tests against that. If you want to run an individual test, you need
> to
> say "perl -Ilib t/foo.t", not "perl t/foo.t". That will cause perl to
> use the Catalyst in the current directory instead of the installed
> version.

Yeah that's probably it. I forgot to mention that you should install
the latest version of Catalyst before doing any testing on engines
(unless you want to fiddle with @INC, etc). :)

_______________________________________________
Catalyst-dev mailing list
Catalyst-dev [at] lists
http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst-dev


yuris at juniper

May 6, 2008, 10:13 AM

Post #12 of 28 (7401 views)
Permalink
Re: Catalyst test suite [In reply to]

I guess my question then would be:
- how do I handle actions that take a while to execute, for example
if I need to talk to an another process that can take a while to
respond, is there a way to integrate the Catalyst server into an
external events loop be it POE, EV or something else.

Andy Grundman wrote:
> I guess we weren't testing the same thing... I was running
> t/optional_http-server.t not the POE test. BTW, the POE engine is no
> longer supported (by me anyway), it's been deprecated in favor of the
> HTTP::Prefork engine.
>
> On May 6, 2008, at 12:41 PM, Yuri Shtil wrote:
>
> _______________________________________________
> Catalyst-dev mailing list
> Catalyst-dev [at] lists
> http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst-dev

_______________________________________________
Catalyst-dev mailing list
Catalyst-dev [at] lists
http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst-dev


andy at hybridized

May 6, 2008, 10:21 AM

Post #13 of 28 (7404 views)
Permalink
Re: Catalyst test suite [In reply to]

What sort of engine are you working on?

On May 6, 2008, at 1:13 PM, Yuri Shtil wrote:

> I guess my question then would be:
> - how do I handle actions that take a while to execute, for example
> if I need to talk to an another process that can take a while to
> respond, is there a way to integrate the Catalyst server into an
> external events loop be it POE, EV or something else.
>
> Andy Grundman wrote:
>> I guess we weren't testing the same thing... I was running t/
>> optional_http-server.t not the POE test. BTW, the POE engine is no
>> longer supported (by me anyway), it's been deprecated in favor of
>> the HTTP::Prefork engine.

_______________________________________________
Catalyst-dev mailing list
Catalyst-dev [at] lists
http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst-dev


yuris at juniper

May 6, 2008, 10:30 AM

Post #14 of 28 (7409 views)
Permalink
Re: Catalyst test suite [In reply to]

Catalyst::Engine::FastCGI <http://www-homes.juniper.net/%7Eyuris/perldoc/lib/Catalyst/Engine/FastCGI.html>


Andy Grundman wrote:
> What sort of engine are you working on?
>
> On May 6, 2008, at 1:13 PM, Yuri Shtil wrote:
>
>> I guess my question then would be:
>> - how do I handle actions that take a while to execute, for example
>> if I need to talk to an another process that can take a while to
>> respond, is there a way to integrate the Catalyst server into an
>> external events loop be it POE, EV or something else.
>>
>> Andy Grundman wrote:
>>> I guess we weren't testing the same thing... I was running
>>> t/optional_http-server.t not the POE test. BTW, the POE engine is
>>> no longer supported (by me anyway), it's been deprecated in favor of
>>> the HTTP::Prefork engine.
>
> _______________________________________________
> Catalyst-dev mailing list
> Catalyst-dev [at] lists
> http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst-dev

_______________________________________________
Catalyst-dev mailing list
Catalyst-dev [at] lists
http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst-dev


andy at hybridized

May 6, 2008, 10:40 AM

Post #15 of 28 (7403 views)
Permalink
Re: Catalyst test suite [In reply to]

Oh for some reason I thought you were writing a new engine. What
problems are you having with the FastCGI engine? There are already
test scripts for testing lighttpd and Apache 1/2 with FastCGI.

On May 6, 2008, at 1:30 PM, Yuri Shtil wrote:

> Catalyst::Engine::FastCGI <http://www-homes.juniper.net/%7Eyuris/perldoc/lib/Catalyst/Engine/FastCGI.html
> >
>
> Andy Grundman wrote:
>> What sort of engine are you working on?
>>
>> On May 6, 2008, at 1:13 PM, Yuri Shtil wrote:
>>
>>> I guess my question then would be:
>>> - how do I handle actions that take a while to execute, for
>>> example if I need to talk to an another process that can take a
>>> while to respond, is there a way to integrate the Catalyst server
>>> into an external events loop be it POE, EV or something else.
>>>
>>> Andy Grundman wrote:
>>>> I guess we weren't testing the same thing... I was running t/
>>>> optional_http-server.t not the POE test. BTW, the POE engine is
>>>> no longer supported (by me anyway), it's been deprecated in favor
>>>> of the HTTP::Prefork engine.
>>


_______________________________________________
Catalyst-dev mailing list
Catalyst-dev [at] lists
http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst-dev


yuris at juniper

May 6, 2008, 10:49 AM

Post #16 of 28 (7401 views)
Permalink
Re: Catalyst test suite [In reply to]

I take it back.

As I said, I want to be able to integrate a Catalyst engine into an
events loop and was contemplating to write a new engine.
I foresee a need for load balancing and since the fastcgi engine.
However I wanted to start with something that is simple working and
supported.
I guess I would go with HTTP-POE in spite the fact it is not supported.
The prefork engine will have the same blocking problem in each forked
subprocess, I guess.

Andy Grundman wrote:
> Oh for some reason I thought you were writing a new engine. What
> problems are you having with the FastCGI engine? There are already
> test scripts for testing lighttpd and Apache 1/2 with FastCGI.
>
> On May 6, 2008, at 1:30 PM, Yuri Shtil wrote:
>
>> Catalyst::Engine::FastCGI
>> <http://www-homes.juniper.net/%7Eyuris/perldoc/lib/Catalyst/Engine/FastCGI.html>
>>
>>
>> Andy Grundman wrote:
>>> What sort of engine are you working on?
>>>
>>> On May 6, 2008, at 1:13 PM, Yuri Shtil wrote:
>>>
>>>> I guess my question then would be:
>>>> - how do I handle actions that take a while to execute, for example
>>>> if I need to talk to an another process that can take a while to
>>>> respond, is there a way to integrate the Catalyst server into an
>>>> external events loop be it POE, EV or something else.
>>>>
>>>> Andy Grundman wrote:
>>>>> I guess we weren't testing the same thing... I was running
>>>>> t/optional_http-server.t not the POE test. BTW, the POE engine is
>>>>> no longer supported (by me anyway), it's been deprecated in favor
>>>>> of the HTTP::Prefork engine.
>>>
>
>
> _______________________________________________
> Catalyst-dev mailing list
> Catalyst-dev [at] lists
> http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst-dev

_______________________________________________
Catalyst-dev mailing list
Catalyst-dev [at] lists
http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst-dev


andy at hybridized

May 6, 2008, 11:02 AM

Post #17 of 28 (7400 views)
Permalink
Re: Catalyst test suite [In reply to]

The POE engine also has a blocking problem, a really big one in fact,
and is the reason I gave up on it. What you want to do is currently
not possible, a Catalyst request will generally block the whole
process until it's finished executing. The POE engine tried to use
some tricks to get around parts of the blocking, but the core of your
app code, and things such as database queries, are still going to block.

On May 6, 2008, at 1:49 PM, Yuri Shtil wrote:

> I take it back.
>
> As I said, I want to be able to integrate a Catalyst engine into an
> events loop and was contemplating to write a new engine.
> I foresee a need for load balancing and since the fastcgi engine.
> However I wanted to start with something that is simple working and
> supported.
> I guess I would go with HTTP-POE in spite the fact it is not
> supported. The prefork engine will have the same blocking problem in
> each forked subprocess, I guess.
>
> Andy Grundman wrote:
>> Oh for some reason I thought you were writing a new engine. What
>> problems are you having with the FastCGI engine? There are already
>> test scripts for testing lighttpd and Apache 1/2 with FastCGI.
>>
>> On May 6, 2008, at 1:30 PM, Yuri Shtil wrote:
>>
>>> Catalyst::Engine::FastCGI <http://www-homes.juniper.net/%7Eyuris/perldoc/lib/Catalyst/Engine/FastCGI.html
>>> >
>>>
>>> Andy Grundman wrote:
>>>> What sort of engine are you working on?
>>>>
>>>> On May 6, 2008, at 1:13 PM, Yuri Shtil wrote:
>>>>
>>>>> I guess my question then would be:
>>>>> - how do I handle actions that take a while to execute, for
>>>>> example if I need to talk to an another process that can take a
>>>>> while to respond, is there a way to integrate the Catalyst
>>>>> server into an external events loop be it POE, EV or something
>>>>> else.
>>>>>
>>>>> Andy Grundman wrote:
>>>>>> I guess we weren't testing the same thing... I was running t/
>>>>>> optional_http-server.t not the POE test. BTW, the POE engine
>>>>>> is no longer supported (by me anyway), it's been deprecated in
>>>>>> favor of the HTTP::Prefork engine.
>>>>
>>




_______________________________________________
Catalyst-dev mailing list
Catalyst-dev [at] lists
http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst-dev


yuris at juniper

May 6, 2008, 11:03 AM

Post #18 of 28 (7411 views)
Permalink
Re: Catalyst test suite [In reply to]

YeAAA!! I got the tests working after updating Catalyst.

Thank you SO much.

Jonathan Rockway wrote:
> * On Tue, May 06 2008, Yuri Shtil wrote:
>
>> I just fetched the trunk (am not sure whether it is 5.7)
>>
>
> 5.70 is in the name of the directory; make sure you got the correct
> tree:
>
> http://dev.catalyst.perl.org/repos/Catalyst/Catalyst-Runtime/5.70/trunk
>
> I'm not sure why something is trying to load the module with a + in the
> name. When you are telling Catalyst which plugins to load, the leading
> + means to not prepend "Catalyst::Plugin::". For example,
> "use Catalyst qw(Foo +Bar)" would load two modules,
> "Catalyst::Plugin::Foo", and "Bar". The + should never be interpreted
> directly.
>
> Anyway, do this. In the working copy, run "perl Makefile.PL" and "make
> test". Do the tests pass normally? If not, something is wrong with
> your perl or environment. If it works, then everything is OK with
> Catalyst. (The problem would be with how you are invoking the tests, or
> your own engine code.)
>
> I have a feeling you have an old Catalyst installed and are running the
> tests against that. If you want to run an individual test, you need to
> say "perl -Ilib t/foo.t", not "perl t/foo.t". That will cause perl to
> use the Catalyst in the current directory instead of the installed
> version.
>
> Hope this helps.
>
> Regards,
> Jonathan Rockway
>
>

_______________________________________________
Catalyst-dev mailing list
Catalyst-dev [at] lists
http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst-dev


yuris at juniper

May 6, 2008, 11:20 AM

Post #19 of 28 (7411 views)
Permalink
Re: Catalyst test suite [In reply to]

I agree that if the scope of a Catalyst request is to include an action
to finish, you are correct.
However if the scope is to start an action, then an asynchronous events
loop should help.

For example in case of a database query, if the controller uses
something like POE::Component::DBIAgent to send a query and return
immediately, the Catalyst request will "complete" without waiting for
the result. Granted the user will not see the "real" result right away,
but this can be handled via refresh etc.

Andy Grundman wrote:
> The POE engine also has a blocking problem, a really big one in fact,
> and is the reason I gave up on it. What you want to do is currently
> not possible, a Catalyst request will generally block the whole
> process until it's finished executing. The POE engine tried to use
> some tricks to get around parts of the blocking, but the core of your
> app code, and things such as database queries, are still going to block.
>
> On May 6, 2008, at 1:49 PM, Yuri Shtil wrote:
>
>> I take it back.
>>
>> As I said, I want to be able to integrate a Catalyst engine into an
>> events loop and was contemplating to write a new engine.
>> I foresee a need for load balancing and since the fastcgi engine.
>> However I wanted to start with something that is simple working and
>> supported.
>> I guess I would go with HTTP-POE in spite the fact it is not
>> supported. The prefork engine will have the same blocking problem in
>> each forked subprocess, I guess.
>>
>> Andy Grundman wrote:
>>> Oh for some reason I thought you were writing a new engine. What
>>> problems are you having with the FastCGI engine? There are already
>>> test scripts for testing lighttpd and Apache 1/2 with FastCGI.
>>>
>>> On May 6, 2008, at 1:30 PM, Yuri Shtil wrote:
>>>
>>>> Catalyst::Engine::FastCGI
>>>> <http://www-homes.juniper.net/%7Eyuris/perldoc/lib/Catalyst/Engine/FastCGI.html>
>>>>
>>>>
>>>> Andy Grundman wrote:
>>>>> What sort of engine are you working on?
>>>>>
>>>>> On May 6, 2008, at 1:13 PM, Yuri Shtil wrote:
>>>>>
>>>>>> I guess my question then would be:
>>>>>> - how do I handle actions that take a while to execute, for
>>>>>> example if I need to talk to an another process that can take a
>>>>>> while to respond, is there a way to integrate the Catalyst server
>>>>>> into an external events loop be it POE, EV or something else.
>>>>>>
>>>>>> Andy Grundman wrote:
>>>>>>> I guess we weren't testing the same thing... I was running
>>>>>>> t/optional_http-server.t not the POE test. BTW, the POE engine
>>>>>>> is no longer supported (by me anyway), it's been deprecated in
>>>>>>> favor of the HTTP::Prefork engine.
>>>>>
>>>
>
>
>
>
> _______________________________________________
> Catalyst-dev mailing list
> Catalyst-dev [at] lists
> http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst-dev

_______________________________________________
Catalyst-dev mailing list
Catalyst-dev [at] lists
http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst-dev


andy at hybridized

May 6, 2008, 11:23 AM

Post #20 of 28 (7410 views)
Permalink
Re: Catalyst test suite [In reply to]

OK I can't really comment on doing that... in my mind a Catalyst app
should be portable to any engine, and not use POE things that would
require a specific engine. You might be better off writing a pure POE
app using one of the several POE HTTP servers.

On May 6, 2008, at 2:20 PM, Yuri Shtil wrote:

> I agree that if the scope of a Catalyst request is to include an
> action to finish, you are correct.
> However if the scope is to start an action, then an asynchronous
> events loop should help.
>
> For example in case of a database query, if the controller uses
> something like POE::Component::DBIAgent to send a query and return
> immediately, the Catalyst request will "complete" without waiting
> for the result. Granted the user will not see the "real" result
> right away, but this can be handled via refresh etc.
>
> Andy Grundman wrote:
>> The POE engine also has a blocking problem, a really big one in
>> fact, and is the reason I gave up on it. What you want to do is
>> currently not possible, a Catalyst request will generally block the
>> whole process until it's finished executing. The POE engine tried
>> to use some tricks to get around parts of the blocking, but the
>> core of your app code, and things such as database queries, are
>> still going to block.
>>
>> On May 6, 2008, at 1:49 PM, Yuri Shtil wrote:
>>
>>> I take it back.
>>>
>>> As I said, I want to be able to integrate a Catalyst engine into
>>> an events loop and was contemplating to write a new engine.
>>> I foresee a need for load balancing and since the fastcgi engine.
>>> However I wanted to start with something that is simple working
>>> and supported.
>>> I guess I would go with HTTP-POE in spite the fact it is not
>>> supported. The prefork engine will have the same blocking problem
>>> in each forked subprocess, I guess.
>>>
>>> Andy Grundman wrote:
>>>> Oh for some reason I thought you were writing a new engine. What
>>>> problems are you having with the FastCGI engine? There are
>>>> already test scripts for testing lighttpd and Apache 1/2 with
>>>> FastCGI.
>>>>
>>>> On May 6, 2008, at 1:30 PM, Yuri Shtil wrote:
>>>>
>>>>> Catalyst::Engine::FastCGI <http://www-homes.juniper.net/%7Eyuris/perldoc/lib/Catalyst/Engine/FastCGI.html
>>>>> >
>>>>>
>>>>> Andy Grundman wrote:
>>>>>> What sort of engine are you working on?
>>>>>>
>>>>>> On May 6, 2008, at 1:13 PM, Yuri Shtil wrote:
>>>>>>
>>>>>>> I guess my question then would be:
>>>>>>> - how do I handle actions that take a while to execute, for
>>>>>>> example if I need to talk to an another process that can take
>>>>>>> a while to respond, is there a way to integrate the Catalyst
>>>>>>> server into an external events loop be it POE, EV or something
>>>>>>> else.
>>>>>>>
>>>>>>> Andy Grundman wrote:
>>>>>>>> I guess we weren't testing the same thing... I was running t/
>>>>>>>> optional_http-server.t not the POE test. BTW, the POE engine
>>>>>>>> is no longer supported (by me anyway), it's been deprecated
>>>>>>>> in favor of the HTTP::Prefork engine.
>>>>>>




_______________________________________________
Catalyst-dev mailing list
Catalyst-dev [at] lists
http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst-dev


yuris at juniper

May 6, 2008, 11:50 AM

Post #21 of 28 (7408 views)
Permalink
Re: Catalyst test suite [In reply to]

While we are at, what was the blocking problem in the POE engine?


>>
>> Andy Grundman wrote:
>>> The POE engine also has a blocking problem, a really big one in
>>> fact, and is the reason I gave up on it. What you want to do is
>>> currently not possible, a Catalyst request will generally block the
>>> whole process until it's finished executing. The POE engine tried
>>> to use some tricks to get around parts of the blocking, but the core
>>> of your app code, and things such as database queries, are still
>>> going to block.
>>>
>

_______________________________________________
Catalyst-dev mailing list
Catalyst-dev [at] lists
http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst-dev


andy at hybridized

May 6, 2008, 11:57 AM

Post #22 of 28 (7400 views)
Permalink
Re: Catalyst test suite [In reply to]

That your app code blocks the entire process while it's running,
waiting for database queries, making LWP requests, or whatever.

On May 6, 2008, at 2:50 PM, Yuri Shtil wrote:

> While we are at, what was the blocking problem in the POE engine?
>
>
>>>
>>> Andy Grundman wrote:
>>>> The POE engine also has a blocking problem, a really big one in
>>>> fact, and is the reason I gave up on it. What you want to do is
>>>> currently not possible, a Catalyst request will generally block
>>>> the whole process until it's finished executing. The POE engine
>>>> tried to use some tricks to get around parts of the blocking, but
>>>> the core of your app code, and things such as database queries,
>>>> are still going to block.
>>>>
>>
>
> _______________________________________________
> Catalyst-dev mailing list
> Catalyst-dev [at] lists
> http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst-dev





_______________________________________________
Catalyst-dev mailing list
Catalyst-dev [at] lists
http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst-dev


dbix-class at trout

May 6, 2008, 12:21 PM

Post #23 of 28 (7406 views)
Permalink
Re: Catalyst test suite [In reply to]

On Mon, May 05, 2008 at 04:48:03PM -0700, Yuri Shtil wrote:
> Hi,
>
> I am contemplating to write a new Catalyst::Engine subclass.

What and what for? Maybe there are people on here who'd be interested in
helping.

Also, if you give me an htpasswd line, I'll get you svn space set up so
it can live in the Catalyst repository.

--
Matt S Trout Need help with your Catalyst or DBIx::Class project?
Technical Director http://www.shadowcat.co.uk/catalyst/
Shadowcat Systems Ltd. Want a managed development or deployment platform?
http://chainsawblues.vox.com/ http://www.shadowcat.co.uk/servers/

_______________________________________________
Catalyst-dev mailing list
Catalyst-dev [at] lists
http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst-dev


bobtfish at bobtfish

May 7, 2008, 7:44 AM

Post #24 of 28 (7397 views)
Permalink
Re: Catalyst test suite [In reply to]

On 6 May 2008, at 19:23, Andy Grundman wrote:

> OK I can't really comment on doing that... in my mind a Catalyst
> app should be portable to any engine, and not use POE things that
> would require a specific engine. You might be better off writing a
> pure POE app using one of the several POE HTTP servers.

I've found the POE HTTP servers to be a little lacking in error
handling.

They work fine, but have a tendency to explode / misbehave if you
send malformed requests at them, so I wouldn't use them in Internet
facing production.. There were also large problems with memory leaks
in one of the servers I tried, so watch out which one you use...

Sorry for not being more specific (about which ones) - this was ~ 6
months ago so my memory is fading, and the situation has probably
moved on - but I'd be wary of exposing POE HTTP server components to
the wider internet / a heavy load.. As I said, things may have moved
on, and it may all be fine, but I'd do some of your own testing
before building a full app against one to make sure that it fits your
needs...

Cheers
Tom


_______________________________________________
Catalyst-dev mailing list
Catalyst-dev [at] lists
http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst-dev


dbix-class at trout

May 10, 2008, 7:42 AM

Post #25 of 28 (7337 views)
Permalink
Re: Catalyst test suite [In reply to]

Yuri, for christ's sake stop top posting.

On Tue, May 06, 2008 at 11:20:38AM -0700, Yuri Shtil wrote:
> I agree that if the scope of a Catalyst request is to include an action
> to finish, you are correct.
> However if the scope is to start an action, then an asynchronous events
> loop should help.
>
> For example in case of a database query, if the controller uses
> something like POE::Component::DBIAgent to send a query and return
> immediately, the Catalyst request will "complete" without waiting for
> the result. Granted the user will not see the "real" result right away,
> but this can be handled via refresh etc.

Something I experimented with with the POE engine was using a coro for
the request so when the Catalyst part needed to access the DBI or whatever
you'd suspend the coroutine until the POE::Component::EasyDBI[0] return
came back, which removes Andy's blocking problem.

[0] DBIAgent is ancient and not actively maintained

--
Matt S Trout Need help with your Catalyst or DBIx::Class project?
Technical Director http://www.shadowcat.co.uk/catalyst/
Shadowcat Systems Ltd. Want a managed development or deployment platform?
http://chainsawblues.vox.com/ http://www.shadowcat.co.uk/servers/

_______________________________________________
Catalyst-dev mailing list
Catalyst-dev [at] lists
http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst-dev

First page Previous page 1 2 Next page Last page  View All Catalyst dev RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.