[ 
https://issues.apache.org/jira/browse/MINIFICPP-1588?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Gabor Gyimesi updated MINIFICPP-1588:
-------------------------------------
    Description: 
Previously an HTTP test scenario was proposed to be tested, but was removed 
because of it's failure. The scenario should be tested and fixed if needed:
{code:java}
  # Failing scenario, needs to be fixed
  @skip
  Scenario: Multiple files transferred via HTTP are received and transferred 
only once
    Given a GetFile processor with the "Input Directory" property set to 
"/tmp/input"
    And the "Keep Source File" of the GetFile processor is set to "false"
    And two files with content "first message" and "second message" are placed 
in "/tmp/input"
    And a InvokeHTTP processor with the "Remote URL" property set to 
"http://secondary:8080/contentListener";
    And the "HTTP Method" of the InvokeHTTP processor is set to "POST"
    And the "success" relationship of the GetFile processor is connected to the 
InvokeHTTP    And a ListenHTTP processor with the "Listening Port" property set 
to "8080" in a "secondary" flow
    And a PutFile processor with the "Directory" property set to "/tmp/output" 
in the "secondary" flow
    And the "success" relationship of the ListenHTTP processor is connected to 
the PutFile    When both instances start up
    Then two flowfiles with the contents "first message" and "second message" 
are placed in the monitored directory in less than 120 seconds
{code}
where a possible implementation of the prerequisites would be:
{code:python}
@given("two files with content \"{content_1}\" and \"{content_2}\" are placed 
in \"{path}\"")
def step_impl(context, content_1, content_2, path):
    context.execute_steps("""
        given a file with the content \"{content_1}\" is present in \"{path}\"
        and a file with the content \"{content_2}\" is present in 
\"{path}\"""".format(content_1=content_1, content_2=content_2, path=path))
{code}

  was:
Previously an HTTP test scenario was proposed to be tested, but was removed 
because of it's failure. The scenario should be tested and fixed if needed:
{code:java}
  # Failing scenario, needs to be fixed
  @skip
  Scenario: Multiple files transferred via HTTP are received and transferred 
only once
    Given a GetFile processor with the "Input Directory" property set to 
"/tmp/input"
    And the "Keep Source File" of the GetFile processor is set to "false"
    And two files with content "first message" and "second message" are placed 
in "/tmp/input"
    And a InvokeHTTP processor with the "Remote URL" property set to 
"http://secondary:8080/contentListener";
    And the "HTTP Method" of the InvokeHTTP processor is set to "POST"
    And the "success" relationship of the GetFile processor is connected to the 
InvokeHTTP    And a ListenHTTP processor with the "Listening Port" property set 
to "8080" in a "secondary" flow
    And a PutFile processor with the "Directory" property set to "/tmp/output" 
in the "secondary" flow
    And the "success" relationship of the ListenHTTP processor is connected to 
the PutFile    When both instances start up
    Then two flowfiles with the contents "first message" and "second message" 
are placed in the monitored directory in less than 120 seconds
{code}

where

{code:python}
@given("two files with content \"{content_1}\" and \"{content_2}\" are placed 
in \"{path}\"")
def step_impl(context, content_1, content_2, path):
    context.execute_steps("""
        given a file with the content \"{content_1}\" is present in \"{path}\"
        and a file with the content \"{content_2}\" is present in 
\"{path}\"""".format(content_1=content_1, content_2=content_2, path=path))
{code}


> Test multiple files transferred via HTTP
> ----------------------------------------
>
>                 Key: MINIFICPP-1588
>                 URL: https://issues.apache.org/jira/browse/MINIFICPP-1588
>             Project: Apache NiFi MiNiFi C++
>          Issue Type: Bug
>            Reporter: Gabor Gyimesi
>            Priority: Minor
>
> Previously an HTTP test scenario was proposed to be tested, but was removed 
> because of it's failure. The scenario should be tested and fixed if needed:
> {code:java}
>   # Failing scenario, needs to be fixed
>   @skip
>   Scenario: Multiple files transferred via HTTP are received and transferred 
> only once
>     Given a GetFile processor with the "Input Directory" property set to 
> "/tmp/input"
>     And the "Keep Source File" of the GetFile processor is set to "false"
>     And two files with content "first message" and "second message" are 
> placed in "/tmp/input"
>     And a InvokeHTTP processor with the "Remote URL" property set to 
> "http://secondary:8080/contentListener";
>     And the "HTTP Method" of the InvokeHTTP processor is set to "POST"
>     And the "success" relationship of the GetFile processor is connected to 
> the InvokeHTTP    And a ListenHTTP processor with the "Listening Port" 
> property set to "8080" in a "secondary" flow
>     And a PutFile processor with the "Directory" property set to 
> "/tmp/output" in the "secondary" flow
>     And the "success" relationship of the ListenHTTP processor is connected 
> to the PutFile    When both instances start up
>     Then two flowfiles with the contents "first message" and "second message" 
> are placed in the monitored directory in less than 120 seconds
> {code}
> where a possible implementation of the prerequisites would be:
> {code:python}
> @given("two files with content \"{content_1}\" and \"{content_2}\" are placed 
> in \"{path}\"")
> def step_impl(context, content_1, content_2, path):
>     context.execute_steps("""
>         given a file with the content \"{content_1}\" is present in \"{path}\"
>         and a file with the content \"{content_2}\" is present in 
> \"{path}\"""".format(content_1=content_1, content_2=content_2, path=path))
> {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to