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

ASF subversion and git services commented on NIFI-5202:
-------------------------------------------------------

Commit 5613bf4012447c4a1dd5e0d969098efcd156fa88 in nifi's branch 
refs/heads/master from [~ca9mbu]
[ https://git-wip-us.apache.org/repos/asf?p=nifi.git;h=5613bf4 ]

NIFI-5202: Fixed timing issue in TestListDatabaseTables

This closes #2709

Signed-off-by: Mike Thomsen <mikerthom...@gmail.com>


> TestListDatabaseTables timing issue
> -----------------------------------
>
>                 Key: NIFI-5202
>                 URL: https://issues.apache.org/jira/browse/NIFI-5202
>             Project: Apache NiFi
>          Issue Type: Bug
>          Components: Extensions
>            Reporter: Mark Payne
>            Assignee: Matt Burgess
>            Priority: Major
>
> I sometimes see TestListDatabaseTables fail in Travis-CI:
> {code:java}
> [INFO] Results:
> [INFO] 
> [ERROR] Failures: 
> [ERROR]   TestListDatabaseTables.testListTablesMultipleRefresh:218 
> expected:<1> but was:<2>
> [INFO] {code}
> It appears to be a timing issue. When I run it on my laptop, it always 
> succeeds, as-is. However, I can easily reproduce the error above if I update 
> the unit test by adding a Thread.sleep at line 214:
> {code:java}
>         assertEquals("2", 
> results.get(0).getAttribute(ListDatabaseTables.DB_TABLE_COUNT));
>         runner.clearTransferState();
>         Thread.sleep(500);
>         // Add another table immediately, the first table should not be 
> listed again but the second should
>         stmt.execute("create table TEST_TABLE2 (id integer not null, val1 
> integer, val2 integer, constraint my_pk2 primary key (id))");
>         stmt.close();{code}
> With that Thread.sleep(500) added in, it always fails on my laptop. This 
> essentially is mimicking a slower environment, such as travis-ci.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to