code: def test_invalid_executor():
      with pytest.raises(RuntimeError) as exc_info:
  
          class InvalidExecutor3(Executor):
              @requests(on="/invalid")
              async def invalid(self, docs: DocumentArray, **kwargs):
                  yield docs[0]
  
      assert type(exc_info.value.__cause__) is AssertionError
  
      with pytest.raises(RuntimeError) as exc_info:
  
          class InvalidExecutor4(Executor):
              @requests(on="/invalid")
              def invalid(self, docs: DocumentArray, **kwargs):
                  yield docs[0]
  
      assert type(exc_info.value.__cause__) is AssertionError
  
file_path: jina/tests/integration/streaming/test_streaming.py
imports: import asyncio
  import time
  import pytest
  from jina import Client, Deployment, Executor, requests
  from jina._docarray import Document, DocumentArray
  from jina.excepts import BadServer
  from jina.helper import random_port
label_desc: Use image node_id 1 for calling a global function with example usage: test_invalid_executor() without return types