You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: workers.rs
    path of file: ./repos/sdk-core/core/src/core_tests
    
    the code of the file until where you have to start completion: use crate::{
    prost_dur,
    test_help::{
        build_fake_worker, build_mock_pollers, canned_histories, mock_worker, MockPollCfg,
        MockWorkerInputs, MocksHolder, ResponseType, WorkerExt,
    },
    worker::client::mocks::mock_workflow_client,
    PollActivityError, PollWfError,
};
use futures_util::{stream, stream::StreamExt};
use std::{cell::RefCell, time::Duration};
use temporal_sdk_core_api::Worker;
use temporal_sdk_core_protos::{
    coresdk::{
        workflow_activation::workflow_activation_job,
        workflow_commands::{wor
    
async fn can_shutdown_local_act_only_worker_when_act_polling() {
    let t = canned_histories::single_timer("1");
    let mock = mock_workflow_client();
    let mh = MockPollCfg::from_resp_batches("fakeid", t, [1], mock);
    let mut mock = build_mock_pollers(mh);
    mock.worker_cfg(|w| {
        w.no_remote_activities = true;
        w.max_cached_workflows = 1;
    });
    let worker = mock_worker(mock);
    let barrier = Barrier::new(2);

    tokio::join!(
        async {
            barrier.wait().await;
            worker.shutdown().await;
        },
        async {
            let res = worker.poll_workflow_activation().await.unwrap();
            // Complete so there's no outstanding WFT and shutdown can finish
            worker
                .complete_workflow_activation(WorkflowActivationCompletion::empty(res.run_id))
                .await
                .unwrap();
            barrier.wait().await;
            // We need to see workflow poll return shutdown before activity poll will
            assert_matches!(
                worker.poll_workflow_activation().await.unwrap_err(),
                PollWfError::ShutDown
            );
            assert_matches!(
                worker.poll_activity_task().await.unwrap_err(),
                PollActivityError::ShutDown
            );
        }
    );
    worker.drain_pollers_and_shutdown().await;
}