Add test for event loop in runtime