@@ -0,0 +1,1653 @@
+# this test is intended to ensure that only one block is launched when only%0A# one app is invoked. this is a regression test.%0A%0Aimport logging%0Aimport parsl%0Afrom parsl.channels import LocalChannel%0Afrom parsl.config import Config%0Afrom parsl.executors import HighThroughputExecutor%0Afrom parsl.launchers import SimpleLauncher%0Afrom parsl.providers import LocalProvider%0Aimport pytest%0A%0A%0Alogger = logging.getLogger(__name__)%0A%0A%0A@parsl.python_app%0Adef app():%0A    import time%0A    time.sleep(45)%0A%0A%0Aclass OneShotLocalProvider(LocalProvider):%0A    def __init__(self, *args, **kwargs):%0A        logger.info(%22OneShotLocalProvider __init__ with MRO: %7B%7D%22.format(type(self).mro()))%0A        self.recorded_submits = 0%0A        super().__init__(*args, **kwargs)%0A%0A    def submit(self, *args, **kwargs):%0A        logger.info(%22OneShotLocalProvider submit%22)%0A        self.recorded_submits += 1%0A        return super().submit(*args, **kwargs)%0A%0A    status_polling_interval = 600%0A%0A%0A@pytest.mark.local%0Adef test_one_block():%0A%0A    oneshot_provider = OneShotLocalProvider(%0A                    channel=LocalChannel(),%0A                    init_blocks=0,%0A                    min_blocks=0,%0A                    max_blocks=10,%0A                    launcher=SimpleLauncher(),%0A                )%0A%0A    config = Config(%0A        executors=%5B%0A            HighThroughputExecutor(%0A                label=%22htex_local%22,%0A                worker_debug=True,%0A                cores_per_worker=1,%0A                provider=oneshot_provider,%0A            )%0A        %5D,%0A        strategy='simple',%0A    )%0A%0A    parsl.load(config)%0A%0A    f = app()%0A    f.result()%0A    parsl.clear()%0A%0A    assert oneshot_provider.recorded_submits == 1%0A

Add a test to exhibit a scaling bug (#1621)