[NO ISSUE][BAD] DeployedJobEventListener and test case fix
authorXikui Wang <xkkwww@gmail.com>
Sat, 3 Feb 2018 17:26:24 +0000 (09:26 -0800)
committerXikui Wang <xkkwww@gmail.com>
Sat, 3 Feb 2018 17:26:24 +0000 (09:26 -0800)
commite305f1155861da0e80c40ebba1df7e44e22bb64c
treeba719255e2f113585f5be6fccbc9e803825110ad
parent81ee58e3d08f27b26a5409a2b56e173142249557
[NO ISSUE][BAD] DeployedJobEventListener and test case fix

1. The concurrent execution test case sometimes failed at result short.
The reason is the deployed job is removed before all invocations
finished. Added a sleep to the test case, also added running instance
check when dropping the procedure.
2. The DeployedJobEventListner was not registered with
ActiveNotificationHandler. Now it's registered so we can bind multiple
jobs with the event listener in the future.
3. Test cases refactored to make the overall test time shorter.
4. Add `wait-for-completion-procedure` for several test cases to make
sure the result is consistent.

Change-Id: I12ecf5c3c8f5a5c58fefa80673565c0ae3d1c9e6
17 files changed:
asterix-bad/pom.xml
asterix-bad/src/main/java/org/apache/asterix/bad/lang/statement/CreateProcedureStatement.java
asterix-bad/src/main/java/org/apache/asterix/bad/lang/statement/ExecuteProcedureStatement.java
asterix-bad/src/main/java/org/apache/asterix/bad/lang/statement/ProcedureDropStatement.java
asterix-bad/src/main/java/org/apache/asterix/bad/metadata/DeployedJobSpecEventListener.java
asterix-bad/src/test/java/org/apache/asterix/bad/test/BADExecutionTest.java
asterix-bad/src/test/resources/runtimets/queries/channel/ten_minute_channel/ten_minute_channel.1.ddl.sqlpp
asterix-bad/src/test/resources/runtimets/queries/channel/ten_minute_channel/ten_minute_channel.4.sleep.sqlpp
asterix-bad/src/test/resources/runtimets/queries/channel/ten_minute_channel/ten_minute_channel.5.query.sqlpp
asterix-bad/src/test/resources/runtimets/queries/procedure/concurrent_procedure/concurrent_procedure.3.sleep.sqlpp [new file with mode: 0644]
asterix-bad/src/test/resources/runtimets/queries/procedure/concurrent_procedure/concurrent_procedure.4.ddl.sqlpp [moved from asterix-bad/src/test/resources/runtimets/queries/procedure/concurrent_procedure/concurrent_procedure.3.ddl.sqlpp with 100% similarity]
asterix-bad/src/test/resources/runtimets/queries/procedure/concurrent_procedure/concurrent_procedure.5.query.sqlpp [moved from asterix-bad/src/test/resources/runtimets/queries/procedure/concurrent_procedure/concurrent_procedure.4.query.sqlpp with 100% similarity]
asterix-bad/src/test/resources/runtimets/queries/procedure/delete_procedure/delete_procedure.3.update.sqlpp
asterix-bad/src/test/resources/runtimets/queries/procedure/delete_procedure_with_parameters/delete_procedure_with_parameters.3.update.sqlpp
asterix-bad/src/test/resources/runtimets/queries/procedure/insert_procedure/insert_procedure.2.update.sqlpp
asterix-bad/src/test/resources/runtimets/queries/procedure/insert_procedure/insert_procedure.3.update.sqlpp
asterix-bad/src/test/resources/runtimets/queries/procedure/insert_procedure/insert_procedure.4.update.sqlpp