Reputation: 1960
I want to test a Queue-triggered Azure Function over HTTP (integration test).
Is there any general method to call a deployed Azure Function, synchronously?
I have successfully called it with the admin/functions/{function}
endpoint as shown here. But I get 202 Accepted
which is no good - My test needs to wait for the function to complete (and fail if the function failed).
Upvotes: 0
Views: 1112
Reputation: 11040
That behavior is driven by the Function, not the client. So if your Function properly closes the http connection, but continues processing, there's nothing the client can do about that.
So, you can either test through the queue, or have a side function with an HTTP Trigger that calls the same processing method(s) that only returns when it's done.
Upvotes: 3
Reputation: 15042
This is not possible. The Azure Functions host does not support returning the output of a queue trigger to the admin HTTP endpoint. I suggest looking into the suggestion by Johns-305.
Upvotes: 2