コード例 #1
0
def test_get_shard_list():
    conn = SearchConnection(TEST_SERVICE, distrib=True)
    shards = conn.get_shard_list()
    #!NOTE: the exact shard list will change depending on the shard replication configuration
    #    on the test server
    assert 'esgf-index2.ceda.ac.uk' in shards
    # IPSL now replicates all non-local shards.  Just check it has a few shards
    assert len(shards['esgf-index2.ceda.ac.uk']) > 3
コード例 #2
0
 def test_get_shard_list(self):
     conn = SearchConnection(self.test_service, cache=self.cache,
                             distrib=True)
     shards = conn.get_shard_list()
     # !NOTE: the exact shard list will change depending on the shard
     #        replication configuration
     #        on the test server
     assert 'esgf-index1.ceda.ac.uk' in shards
     # IPSL now replicates all non-local shards.
     # Just check it has a few shards
     assert len(shards['esgf-index1.ceda.ac.uk']) > 1
コード例 #3
0
def test_get_shard_list():
    conn = SearchConnection(TEST_SERVICE, distrib=True)
    shards = conn.get_shard_list()
    assert 'localhost:8983/solr/datasets' in shards
    assert 'pcmdi11.llnl.gov:8983/solr/datasets' in shards