Search in sources :

Example 41 with TableIdent

use of io.crate.metadata.TableIdent in project crate by crate.

the class FetchContextTest method testGetIndexServiceForInvalidReaderId.

@Test
public void testGetIndexServiceForInvalidReaderId() throws Exception {
    final FetchContext context = new FetchContext(new FetchPhase(1, null, new TreeMap<String, Integer>(), HashMultimap.<TableIdent, String>create(), ImmutableList.<Reference>of()), "dummy", new SharedShardContexts(mock(IndicesService.class)), Collections.<Routing>emptyList());
    expectedException.expect(IllegalArgumentException.class);
    context.indexService(10);
}
Also used : SharedShardContexts(io.crate.action.job.SharedShardContexts) TestingHelpers.createReference(io.crate.testing.TestingHelpers.createReference) Reference(io.crate.metadata.Reference) FetchPhase(io.crate.planner.node.fetch.FetchPhase) TableIdent(io.crate.metadata.TableIdent) TreeMap(java.util.TreeMap) Test(org.junit.Test) CrateUnitTest(io.crate.test.integration.CrateUnitTest)

Aggregations

TableIdent (io.crate.metadata.TableIdent)41 Test (org.junit.Test)18 CrateUnitTest (io.crate.test.integration.CrateUnitTest)15 PartitionName (io.crate.metadata.PartitionName)8 NoopClusterService (org.elasticsearch.test.cluster.NoopClusterService)7 Before (org.junit.Before)7 Reference (io.crate.metadata.Reference)6 DocTableInfo (io.crate.metadata.doc.DocTableInfo)6 List (java.util.List)5 Routing (io.crate.metadata.Routing)4 QualifiedName (io.crate.sql.tree.QualifiedName)4 BytesRef (org.apache.lucene.util.BytesRef)4 TableRelation (io.crate.analyze.relations.TableRelation)3 ReferenceIdent (io.crate.metadata.ReferenceIdent)3 TestingTableInfo (io.crate.metadata.table.TestingTableInfo)3 SqlExpressions (io.crate.testing.SqlExpressions)3 CompletableFuture (java.util.concurrent.CompletableFuture)3 IntObjectHashMap (com.carrotsearch.hppc.IntObjectHashMap)2 ImmutableList (com.google.common.collect.ImmutableList)2 SharedShardContexts (io.crate.action.job.SharedShardContexts)2