- added test for delay to cover the case of closeOnError enabled