tests for option.keepAlive and throwing of errorif already executed