[ https://issues.apache.org/jira/browse/NIFI-5202?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Mike Thomsen updated NIFI-5202: ------------------------------- Resolution: Fixed Status: Resolved (was: Patch Available) > 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 > Fix For: 1.7.0 > > > 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)