use of datawave.query.testframework.QueryLogicTestHarness in project datawave by NationalSecurityAgency.
the class FacetedQueryLogicTest method querySetUp.
@Before
public void querySetUp() throws IOException {
log.debug("--------- querySetUp ---------");
// Super call to pick up authSet initialization
super.querySetUp();
FacetedQueryLogic facetLogic = new FacetedQueryLogic();
facetLogic.setFacetedSearchType(FacetedSearchType.FIELD_VALUE_FACETS);
facetLogic.setFacetTableName(QueryTestTableHelper.FACET_TABLE_NAME);
facetLogic.setFacetMetadataTableName(QueryTestTableHelper.FACET_METADATA_TABLE_NAME);
facetLogic.setFacetHashTableName(QueryTestTableHelper.FACET_HASH_TABLE_NAME);
facetLogic.setMaximumFacetGrouping(200);
facetLogic.setMinimumFacet(1);
this.logic = facetLogic;
QueryTestTableHelper.configureLogicToScanTables(this.logic);
this.logic.setFullTableScanEnabled(false);
this.logic.setIncludeDataTypeAsField(true);
this.logic.setIncludeGroupingContext(true);
this.logic.setDateIndexHelperFactory(new DateIndexHelperFactory());
this.logic.setMarkingFunctions(new MarkingFunctions.Default());
this.logic.setMetadataHelperFactory(new MetadataHelperFactory());
this.logic.setResponseObjectFactory(new DefaultResponseObjectFactory());
// init must set auths
testInit();
SubjectIssuerDNPair dn = SubjectIssuerDNPair.of("userDn", "issuerDn");
DatawaveUser user = new DatawaveUser(dn, DatawaveUser.UserType.USER, Sets.newHashSet(this.auths.toString().split(",")), null, null, -1L);
this.principal = new DatawavePrincipal(Collections.singleton(user));
this.testHarness = new QueryLogicTestHarness(this);
}
use of datawave.query.testframework.QueryLogicTestHarness in project datawave by NationalSecurityAgency.
the class IndexQueryLogicTest method querySetUp.
@Before
public void querySetUp() throws IOException {
log.debug("--------- querySetUp ---------");
// Super call to pick up authSet initialization
super.querySetUp();
this.logic = new IndexQueryLogic();
QueryTestTableHelper.configureLogicToScanTables(this.logic);
this.logic.setFullTableScanEnabled(false);
this.logic.setIncludeDataTypeAsField(true);
this.logic.setIncludeGroupingContext(true);
this.logic.setDateIndexHelperFactory(new DateIndexHelperFactory());
this.logic.setMarkingFunctions(new MarkingFunctions.Default());
this.logic.setMetadataHelperFactory(new MetadataHelperFactory());
this.logic.setQueryPlanner(new DefaultQueryPlanner());
this.logic.setResponseObjectFactory(new DefaultResponseObjectFactory());
// init must set auths
testInit();
SubjectIssuerDNPair dn = SubjectIssuerDNPair.of("userDn", "issuerDn");
DatawaveUser user = new DatawaveUser(dn, DatawaveUser.UserType.USER, Sets.newHashSet(this.auths.toString().split(",")), null, null, -1L);
this.principal = new DatawavePrincipal(Collections.singleton(user));
this.testHarness = new QueryLogicTestHarness(this);
}
Aggregations