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

ASF GitHub Bot commented on FLINK-5871:
---------------------------------------

Github user tillrohrmann commented on a diff in the pull request:

    https://github.com/apache/flink/pull/3381#discussion_r102471060
  
    --- Diff: 
flink-libraries/flink-cep/src/test/java/org/apache/flink/cep/nfa/compiler/NFACompilerTest.java
 ---
    @@ -42,6 +45,43 @@
     
     public class NFACompilerTest extends TestLogger {
     
    +   @Rule
    +   public ExpectedException expectedException = ExpectedException.none();
    +
    +   @Test
    +   public void testNFACompilerUniquePatternName() {
    +
    +           // adjust the rule
    +           expectedException.expect(MalformedPatternException.class);
    +           expectedException.expectMessage("Duplicate pattern name: start. 
Pattern names must be unique.");
    --- End diff --
    
    Matching on exception messages is fragile


> Enforce uniqueness of pattern names in CEP.
> -------------------------------------------
>
>                 Key: FLINK-5871
>                 URL: https://issues.apache.org/jira/browse/FLINK-5871
>             Project: Flink
>          Issue Type: Bug
>          Components: CEP
>    Affects Versions: 1.3.0
>            Reporter: Kostas Kloudas
>            Assignee: Kostas Kloudas
>              Labels: cep
>             Fix For: 1.3.0
>
>
> Currently, although required, the {{NFACompiler}} does not impose uniqueness 
> of the chosen pattern names. This issue addresses that, and the proposed 
> strategy is to throw an exception whenever a malformed pattern like this is 
> encountered.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to