Refactored the test run of GrokAssembly to avoid double-closing