In the Async API, TransactionContext.executeUpdateAsync() correctly propagates errors through ApiFuture callbacks. However, in an asynchronous transaction, the .then() operator does not get the same exceptions propagated to it from the transaction function.
The following test (just add a custom databaseId) hangs because neither the success nor failure callback is called, and the latch is never released. If the SQL statement were corrected, the test would pass, as success is propagated correctly.
* fix: AsyncTransactionManager did not propagate statement errors
Invalid statements or other statements that would cause an error would not cause the
returned ApiFuture to fail.
* test: use existing invalid statement in test