def test_sock_path_len():
    """
    This tests whether or not a larger hash causes the sock path to exceed
    the system's max sock path length. See the below link for more
    information.

    https://github.com/saltstack/salt/issues/12172#issuecomment-43903643
    """
    opts = {
        "id": "salt-testing",
        "hash_type": "sha512",
        "sock_dir": os.path.join(salt.syspaths.SOCK_DIR, "minion"),
        "extension_modules": "",
    }
    opts = salt.config.DEFAULT_MINION_OPTS.copy()
    with patch.dict(opts, opts):
        try:
            event_publisher = event.AsyncEventPublisher(opts)
            result = True
        except ValueError:
            #  There are rare cases where we operate a closed socket, especially in containers.
            # In this case, don't fail the test because we'll catch it down the road.
            result = True
        except SaltSystemExit:
            result = False
    assert result