You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
We are attempting to write some integration tests for our azure functions, however the function runtime restarts instead of exiting when the test are complete, so the process never finishes.
To Reproduce
Steps to reproduce the behavior:
Create a new function app
Create at least one http trigger
Write an integration test using jest which makes a http request against the trigger
Install the following packages: jest, ts-jest, concurrently, wait-on
Execute the following command on the terminal: npm run test
Wait for process to complete.
Expected behavior
When the jest exits, concurrently should kill the azure function runtime, and terminate.
Actual behavior
Jest exits successfully.
Concurrently sends a kill signal to the azure function runtime.
The azure function runtime restarts itself and keeps running.
Integration tests never complete, because runtime is still active.
Relevant Console Output
[1] Ran all test suites.
[1] wait-on tcp:7071 && jest exited with code 0
--> Sending SIGTERM to other processes..
[0] [2022-12-08T16:06:34.042Z] Language Worker Process exited. Pid=64056.
[0] [2022-12-08T16:06:34.042Z] node exited with code 143 (0x8F). .
[0] [2022-12-08T16:06:34.280Z] Worker process started and initialized.
Proposed Fix
Add a command line argument to func start which prevents the runtime from restarting when it is killed.
The text was updated successfully, but these errors were encountered:
Describe the bug
We are attempting to write some integration tests for our azure functions, however the function runtime restarts instead of exiting when the test are complete, so the process never finishes.
To Reproduce
Steps to reproduce the behavior:
jest
which makes a http request against the triggerpackage.json
npm run test
Expected behavior
When the jest exits, concurrently should kill the azure function runtime, and terminate.
Actual behavior
Relevant Console Output
Proposed Fix
Add a command line argument to
func start
which prevents the runtime from restarting when it is killed.The text was updated successfully, but these errors were encountered: