docstr: Test asynchronous remote calls get dropped if too many in-flight calls.
docstr_tok: ["Test","asynchronous","remote","calls","get","dropped","if","too","many","in-flight","calls","."]
code: def test_async_calls_get_dropped_if_inflight_requests_over_limit(
      self,
  ):
      """Test asynchronous remote calls get dropped if too many in-flight calls."""
      actors = [Actor.remote(i, maybe_crash=False) for i in range(4)]
      manager = FaultTolerantActorManager(
          actors=actors,
          max_remote_requests_in_flight_per_actor=2,
      )
  
      # 2 asynchronous call to actor 1.
      num_of_calls = manager.foreach_actor_async(
          lambda w: w.call(),
          remote_actor_ids=[0, 0],
      )
      self.assertEqual(num_of_calls, 2)
  
      # Now, let's try to make another async call to actor 1.
      num_of_calls = manager.foreach_actor_async(
          lambda w: w.call(),
          healthy_only=False,
          remote_actor_ids=[0],
      )
      # We actually made 0 calls.
      self.assertEqual(num_of_calls, 0)
  
      manager.clear()
  
imports: import functools
  import os
  from pathlib import Path
  import pickle
  import sys
  import time
  import unittest
  import ray
  from ray.util.state import list_actors
  from ray.rllib.utils.actor_manager import FaultAwareApply, FaultTolerantActorManager
label_desc: Use image node_id 12 for calling the TestActorManager obj's underlying member method code with example usage: obj.test_async_calls_get_dropped_if_inflight_requests_over_limit() without return types