edgent-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Cazen Lee (JIRA)" <j...@apache.org>
Subject [jira] [Issue Comment Deleted] (QUARKS-143) bogus test behavior with DevelopmentProvider
Date Sun, 17 Apr 2016 10:27:25 GMT

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

Cazen Lee updated QUARKS-143:
-----------------------------
    Comment: was deleted

(was: Good day [~dlaboss]
How about 
{code}
s = s.filter(tuple ->
{ System.out.println("filter tuple: "+tuple); return true; }
);
{code}

instead of

{code}
s.filter(tuple ->
{ System.out.println("filter tuple: "+tuple); return true; }
);
{code})

> bogus test behavior with DevelopmentProvider 
> ---------------------------------------------
>
>                 Key: QUARKS-143
>                 URL: https://issues.apache.org/jira/browse/QUARKS-143
>             Project: Quarks
>          Issue Type: Bug
>          Components: Runtime
>            Reporter: Dale LaBossiere
>
> I'm perplexed... if you add the following test to TStreamTest and run the DirectTStreamTest
it works.  If you run the DevelopmentTStreamTest it fails as noted in the commentary.
>     
>     @Test
>     public void testBrokenDevelopmentProvider() throws Exception {
>         Topology t = newTopology();
>         
>         // For some reason, the following sequence fails with no content
>         // received by the tester when run with the DevelopmentProvider.
>         //
>         // Commenting out either the s.filter() OR the s.peek() makes it work.
>         // OR putting the peek() before the filter() statement works!???
>         //
>         // This runs fine with the DirectProvider.
>         //
>         // I understand that given the structure of this test, the test
>         // could reach completion before either the filter or peek was actually
>         // called for the second tuple but that doesn't mean the tester
>         // should receive/report no tuples.  (in practice, the full println
>         // output is present when it fails).
>         TStream<String> s = t.strings("a", "b");
>         s.filter(tuple -> { System.out.println("filter tuple: "+tuple); return true;
});
>         s.peek(tuple -> System.out.println("peek tuple: "+tuple));
>         Condition<Long> tc = t.getTester().tupleCount(s, 2);
>         Condition<List<String>> contents = t.getTester().streamContents(s,
"a", "b");
>         complete(t, tc);
>         assertTrue("contents "+contents.getResult(), contents.valid());
>     }



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message