package org.rakam;

import com.google.common.eventbus.EventBus;
import org.rakam.analysis.ContinuousQueryService;
import org.rakam.analysis.InMemoryQueryMetadataStore;
import org.rakam.analysis.TestContinuousQueryService;
import org.rakam.analysis.metadata.Metastore;
import org.rakam.collection.FieldDependencyBuilder;
import org.rakam.event.TestingEnvironment;
import org.rakam.presto.analysis.PrestoContinuousQueryService;
import org.rakam.presto.analysis.PrestoMetastore;
import org.rakam.presto.analysis.PrestoQueryExecutor;
import org.rakam.report.realtime.RealTimeConfig;
import org.testng.annotations.BeforeSuite;
import org.testng.annotations.Test;

@Test(enabled=false)
public class TestPrestoContinuousQueryService extends TestContinuousQueryService {
    private PrestoContinuousQueryService continuousQueryService;
    private Metastore metastore;
    private TestingEnvironment testEnvironment;

    @BeforeSuite
    public void setUp() throws Exception {
        testEnvironment = new TestingEnvironment();

        metastore = new PrestoMetastore(testEnvironment.getPrestoMetastore(),
                new EventBus(), new FieldDependencyBuilder().build(), testEnvironment.getPrestoConfig());
        metastore.setup();

        InMemoryQueryMetadataStore queryMetadataStore = new InMemoryQueryMetadataStore();

        PrestoQueryExecutor prestoQueryExecutor = new PrestoQueryExecutor(testEnvironment.getPrestoConfig(), null, null, metastore);

        continuousQueryService = new PrestoContinuousQueryService(queryMetadataStore, new RealTimeConfig(),
                prestoQueryExecutor, testEnvironment.getPrestoConfig());
    }

    @Override
    public ContinuousQueryService getContinuousQueryService() {
        return continuousQueryService;
    }

    @Override
    public Metastore getMetastore() {
        return metastore;
    }
}

@@ -723,42 +723,8 @@
 ice 
-extends TestContinuousQueryService
  %7B%0A 
@@ -869,16 +869,18 @@
 nment;%0A%0A
+//
     @Bef
@@ -1601,32 +1601,34 @@
 nfig());%0A    %7D%0A%0A
+//
     @Override%0A  
@@ -1735,16 +1735,18 @@
 %0A    %7D%0A%0A
+//
     @Ove

Fix failing tests