class_docstr: Test Benchmark creation
code: def test_experiments_parallel(self, benchmark_config_py, monkeypatch):
      import multiprocessing
  
      class FakeFuture:
          def __init__(self, value):
              self.value = value
  
          def wait(self, timeout=None):
              return
  
          def ready(self):
              return True
  
          def get(self, timeout=None):
              return self.value
  
          def successful(self):
              return True
  
      count = multiprocessing.Value("i", 0)
      is_done_value = multiprocessing.Value("i", 0)
  
      def is_done(self):
          return count.value > 0
  
      def submit(*args, c=count, **kwargs):
          # because worker == 2 only 2 jobs were submitted
          # we now set is_done to True so when runner checks
          # for adding more jobs it will stop right away
          c.value += 1
          return FakeFuture([dict(name="v", type="objective", value=1)])
  
      with OrionState() as cfg:
          config = copy.deepcopy(benchmark_config_py)
  
          with Joblib(n_workers=5, backend="threading") as executor:
              monkeypatch.setattr(
                  ExperimentClient, "is_done", property(is_done)
              )
              monkeypatch.setattr(executor, "submit", submit)
  
              config["executor"] = executor
              bm1 = get_or_create_benchmark(cfg.storage, **config)
              # This line now fails because bm1.studies[0].experiments_info has length zero.
              # client = bm1.studies[0].experiments_info[0][1]
  
              count.value = 0
              bm1.process(n_workers=2)
              assert count.value == 2
              assert executor.n_workers == 5
              assert orion.core.config.worker.n_workers != 2
  
              is_done.done = False
              count.value = 0
              bm1.process(n_workers=3)
              assert count.value == 3
              assert executor.n_workers == 5
              assert orion.core.config.worker.n_workers != 3
  
imports: import copy
  import logging
  import pytest
  import orion.benchmark.benchmark_client
  import orion.core
  from orion.benchmark.assessment import AverageResult
  from orion.benchmark.benchmark_client import get_or_create_benchmark
  from orion.benchmark.task import CarromTable, RosenBrock
  from orion.client import ExperimentClient
  from orion.core.utils.exceptions import NoConfigurationError
  from orion.executor.joblib_backend import Joblib
  from orion.storage.base import setup_storage
  from orion.testing.state import OrionState
label_desc: Use image node_id 12 for calling the TestCreateBenchmark obj's underlying member method code with example usage: obj.test_experiments_parallel(benchmark_config_py, monkeypatch) and returns: unknown, FakeFuture, True, self, True