[ 
https://issues.apache.org/jira/browse/CONNECTORS-430?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13242509#comment-13242509
 ] 

Erlend Garåsen commented on CONNECTORS-430:
-------------------------------------------

Now I did a svn up. I noticed a few things. If I keep my simplified shortened 
regexp mentioned above, I get the following error:
{code}
    [junit]   File 
"/Users/erlendfg/tmp/mcf_2012/tests/webcrawler/test-derby-output/VirtualBrowser.py",
 line 870, in find_button
    [junit]     raise Exception("Can't find button %s on page %s" % 
(alt,self.current_url))
    [junit] Exception: Can't find button Add url regexp on page 
http://localhost:8346/mcf-cr ...
{code}

If I remove the regexp var and do the following:
{code}
if (! /http(s)?:\/\/.*/.test(line))
{code}
I get:
{code}
    [junit]   File 
"/Users/erlendfg/tmp/mcf_2012/tests/webcrawler/test-derby-output/Javascript.py",
 line 72, in get_referenced_object
    [junit]     raise Exception("Object %s has no legal object reference" % 
unicode(self))
    [junit] Exception: Object <Javascript.JSRegexp instance at 0x1005a03b0> has 
no legal object reference
    [junit] 2012-03-30 18:12:52.429:INFO::Stopped SocketConnector@0.0.0.0:8346
{code}

If I comment out the regexp check (two lines), the test passes. I guess it is 
something about the test() function which does not play well with the browser 
simulator.
                
> An error should be returned if invalid seeds are typed into the seeds list 
> for the web connector
> ------------------------------------------------------------------------------------------------
>
>                 Key: CONNECTORS-430
>                 URL: https://issues.apache.org/jira/browse/CONNECTORS-430
>             Project: ManifoldCF
>          Issue Type: Improvement
>          Components: Web connector
>    Affects Versions: ManifoldCF 0.1, ManifoldCF 0.2, ManifoldCF 0.3, 
> ManifoldCF 0.4, ManifoldCF 0.5
>            Reporter: Erlend Garåsen
>            Assignee: Erlend Garåsen
>            Priority: Minor
>             Fix For: ManifoldCF 0.6
>
>         Attachments: CONNECTORS-430.patch, CONNECTORS-430.patch
>
>
> If you create a job for the web connector and enter an invalid URL into the 
> seeds list, any value is accepted. An error message should be returned to the 
> user in order to prevent invalid seeds.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira


Reply via email to