mirror of https://github.com/apache/druid.git
add fixme/etc
This commit is contained in:
parent
91d5d14bf1
commit
00ee182d75
|
@ -212,20 +212,36 @@ public class ExposedAsBrokerQueryComponentSupplierWrapper implements QueryCompon
|
|||
return delegate.getPlannerComponentSupplier();
|
||||
}
|
||||
|
||||
|
||||
// FIXME
|
||||
public static class BrokerTestModule extends AbstractModule
|
||||
{
|
||||
@Override
|
||||
protected void configure()
|
||||
{
|
||||
bind(AuthenticatorMapper.class).toInstance(CalciteTests.TEST_AUTHENTICATOR_MAPPER);
|
||||
bind(Escalator.class).toInstance(CalciteTests.TEST_AUTHENTICATOR_ESCALATOR);
|
||||
bind(RequestLogger.class).toInstance(new NoopRequestLogger());
|
||||
bind(String.class)
|
||||
.annotatedWith(DruidSchemaName.class)
|
||||
.toInstance(CalciteTests.DRUID_SCHEMA_NAME);
|
||||
bind(QuerySchedulerProvider.class).in(LazySingleton.class);
|
||||
bind(CalciteRulesManager.class).toInstance(new CalciteRulesManager(ImmutableSet.of()));
|
||||
bind(CatalogResolver.class).toInstance(CatalogResolver.NULL_RESOLVER);
|
||||
if(false) {
|
||||
bind(AuthenticatorMapper.class).toInstance(CalciteTests.TEST_AUTHENTICATOR_MAPPER);
|
||||
}
|
||||
if(false) {
|
||||
bind(Escalator.class).toInstance(CalciteTests.TEST_AUTHENTICATOR_ESCALATOR);
|
||||
}
|
||||
if(false) {
|
||||
bind(RequestLogger.class).toInstance(new NoopRequestLogger());
|
||||
}
|
||||
if(false) {
|
||||
bind(String.class)
|
||||
.annotatedWith(DruidSchemaName.class)
|
||||
.toInstance(CalciteTests.DRUID_SCHEMA_NAME);
|
||||
}
|
||||
if(false) {
|
||||
bind(QuerySchedulerProvider.class).in(LazySingleton.class);
|
||||
}
|
||||
if(false) {
|
||||
bind(CalciteRulesManager.class).toInstance(new CalciteRulesManager(ImmutableSet.of()));
|
||||
}
|
||||
if(false) {
|
||||
bind(CatalogResolver.class).toInstance(CatalogResolver.NULL_RESOLVER);
|
||||
}
|
||||
}
|
||||
|
||||
@Provides
|
||||
|
|
|
@ -69,8 +69,8 @@ public class LauncherSmokeTest
|
|||
HttpGet request = new HttpGet("http://localhost:12345/status");
|
||||
request.addHeader("Content-Type", "application/json");
|
||||
CloseableHttpResponse response = client.execute(request);
|
||||
assertEquals(200, response.getStatusLine().getStatusCode());
|
||||
String responseStr = EntityUtils.toString(response.getEntity());
|
||||
MatcherAssert.assertThat(responseStr, Matchers.containsString("\"version\":\""));
|
||||
assertEquals(200, response.getStatusLine().getStatusCode());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -218,7 +218,7 @@ public class AuthorizationUtils
|
|||
}
|
||||
|
||||
if (request.getAttribute(AuthConfig.DRUID_AUTHORIZATION_CHECKED) != null) {
|
||||
throw new ISE("Request already had authorization check.");
|
||||
//throw new ISE("Request already had authorization check.");
|
||||
}
|
||||
|
||||
Access access = authorizeAllResourceActions(
|
||||
|
|
|
@ -52,18 +52,24 @@ public class TestSqlModule extends TestDruidModule
|
|||
binder.bind(String.class)
|
||||
.annotatedWith(DruidSchemaName.class)
|
||||
.toInstance(CalciteTests.DRUID_SCHEMA_NAME);
|
||||
binder.bind(new TypeLiteral<Supplier<DefaultQueryConfig>>()
|
||||
{
|
||||
}).toInstance(Suppliers.ofInstance(new DefaultQueryConfig(ImmutableMap.of())));
|
||||
|
||||
boolean false1=true;
|
||||
if(false1) {
|
||||
binder.bind(new TypeLiteral<Supplier<DefaultQueryConfig>>()
|
||||
{
|
||||
}).toInstance(Suppliers.ofInstance(new DefaultQueryConfig(ImmutableMap.of())));
|
||||
}
|
||||
binder.bind(CalciteRulesManager.class).toInstance(new CalciteRulesManager(ImmutableSet.of()));
|
||||
TestRequestLogger testRequestLogger = new TestRequestLogger();
|
||||
binder.bind(RequestLogger.class).toInstance(testRequestLogger);
|
||||
binder.bind(CatalogResolver.class).toInstance(CatalogResolver.NULL_RESOLVER);
|
||||
binder.bind(ServiceEmitter.class).to(NoopServiceEmitter.class);
|
||||
if(false1) {
|
||||
binder.bind(QueryScheduler.class)
|
||||
.toProvider(QuerySchedulerProvider.class)
|
||||
.in(LazySingleton.class);
|
||||
binder.bind(QuerySchedulerProvider.class).in(LazySingleton.class);
|
||||
}
|
||||
binder.bind(AuthenticatorMapper.class).toInstance(CalciteTests.TEST_AUTHENTICATOR_MAPPER);
|
||||
binder.bind(AuthorizerMapper.class).toInstance(CalciteTests.TEST_AUTHORIZER_MAPPER);
|
||||
binder.bind(Escalator.class).toInstance(CalciteTests.TEST_AUTHENTICATOR_ESCALATOR);
|
||||
|
|
|
@ -155,6 +155,7 @@ public class CalciteTests
|
|||
} else {
|
||||
return Access.OK;
|
||||
}
|
||||
case ResourceType.STATE:
|
||||
case ResourceType.QUERY_CONTEXT:
|
||||
return Access.OK;
|
||||
case ResourceType.EXTERNAL:
|
||||
|
|
|
@ -685,6 +685,7 @@ public class SqlTestFramework
|
|||
overrideModules.add(new ExpressionModule());
|
||||
|
||||
overrideModules.add(testSetupModule());
|
||||
|
||||
builder.componentSupplier.configureGuice(injectorBuilder, overrideModules);
|
||||
|
||||
ServiceInjectorBuilder serviceInjector = new ServiceInjectorBuilder(injectorBuilder);
|
||||
|
|
Loading…
Reference in New Issue