Skip to content

Commit

Permalink
TEIID-4627 ensuring that the trigger processing terminates
Browse files Browse the repository at this point in the history
  • Loading branch information
shawkins committed Jan 23, 2017
1 parent cbe91c3 commit d32a5fa
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
Expand Up @@ -128,7 +128,9 @@ public TupleBatch nextBatch() throws BlockedException,
open = false;
planIndex++;
}
return new TupleBatch(1, new List<?>[0]);
TupleBatch batch = new TupleBatch(1, new List<?>[0]);
batch.setTerminationFlag(true);
return batch;
}

@Override
Expand Down Expand Up @@ -178,7 +180,7 @@ public Object clone() {

@Override
public List<Expression> getProjectedSymbols() {
return null;
return Command.getUpdateCommandSymbol();
}

@Override
Expand Down
Expand Up @@ -289,6 +289,7 @@ public boolean supportsCompareCriteriaEquals() {

this.internalConnection = server.createConnection("jdbc:teiid:test3");
checkResult("testTriggers", "select * from sysadmin.triggers"); //$NON-NLS-1$ //$NON-NLS-2$
closeStatement();

//insert event
server.getEventDistributor().dataModification("test3", "1", "x", "t", null, new Object[] {1}, null);
Expand All @@ -312,6 +313,9 @@ public boolean supportsCompareCriteriaEquals() {

//no trigger
assertEquals(2, ef.getCommands().size());

//make sure all triggers have completed
assertEquals(0, server.getAdmin().getRequests().size());
}

@Test public void testSpatial() throws Exception {
Expand Down

0 comments on commit d32a5fa

Please sign in to comment.