class_docstr: Checks the full filesystem resolution functionality, exercising each URL interpretation case.
docstr: Case 3a: HDFS nameservice.
docstr_tok: ["Case","3a",":","HDFS","nameservice","."]
code: def test_hdfs_url_with_nameservice(self):
      """Case 3a: HDFS nameservice."""
      suj = FilesystemResolver(
          HC.WARP_TURTLE_PATH,
          self._hadoop_configuration,
          connector=self.mock,
          user=self.mock_name,
      )
      self.assertEqual(MockHdfs, type(suj.filesystem()._hdfs))
      self.assertEqual(self.mock_name, suj.filesystem()._user)
      self.assertEqual(HC.WARP_TURTLE, suj.parsed_dataset_url().netloc)
      self.assertEqual(
          1, self.mock.connect_attempted(HC.WARP_TURTLE_NN2)
      )
      self.assertEqual(
          0, self.mock.connect_attempted(HC.WARP_TURTLE_NN1)
      )
      self.assertEqual(0, self.mock.connect_attempted(HC.DEFAULT_NN))
  
      # Make sure we did not capture FilesystemResolver in a closure by mistake
      dill.dumps(suj.filesystem_factory())
  
imports: import unittest
  import dill
  from pyarrow.filesystem import LocalFileSystem
  from pyarrow.lib import ArrowIOError
  from six.moves.urllib.parse import urlparse
  import gcsfs
  import s3fs
  from petastorm.fs_utils import FilesystemResolver, get_filesystem_and_path_or_paths
  from petastorm.hdfs.tests.test_hdfs_namenode import HC, MockHadoopConfiguration, MockHdfs, MockHdfsConnector
label_desc: Use image node_id 5 for calling the FilesystemResolverTest obj's underlying member method code with example usage: obj.test_hdfs_url_with_nameservice() without return types