The Kubernetes executor has surprisingly low test coverage: 64% 

https://codecov.io/gh/apache/airflow/src/master/airflow/executors/kubernetes_executor.py - looks like some of the "flush/end" code is not tested.

We might want to improve it.
tests/executors/test_kubernetes_executor.py
now = timezone.utcnow()
        pending_pods = [
            k8s.V1Pod(
                metadata=k8s.V1ObjectMeta(
                    name="foo90",
                    labels={"airflow-worker": "123"},
                    creation_timestamp=now - timedelta(seconds=500),
                    namespace="anothernamespace",
                )
            ),
        ]
        mock_kube_client.list_pod_for_all_namespaces.return_value.items = pending_pods
        config = {
            ('kubernetes', 'namespace'): 'mynamespace',
            ('kubernetes', 'multi_namespace_mode'): 'true',
            ('kubernetes', 'kube_client_request_args'): '{"sentinel": "foo"}',
        }
        with conf_vars(config):
            executor = KubernetesExecutor()
            executor.job_id = "123"
            executor.start()
            executor._check_worker_pods_pending_timeout()
        mock_kube_client.list_pod_for_all_namespaces.assert_called_once_with(
            field_selector='status.phase=Pending',
            label_selector='airflow-worker=123',
            limit=100,
            sentinel='foo',
        )
        mock_delete_pod.assert_called_once_with('foo90', 'anothernamespace')
class TestKubernetesJobWatcher(unittest.TestCase):