killbill-memoizeit
Changes
osgi-bundles/bundles/analytics/pom.xml 73(+0 -73)
Details
osgi-bundles/bundles/analytics/pom.xml 73(+0 -73)
diff --git a/osgi-bundles/bundles/analytics/pom.xml b/osgi-bundles/bundles/analytics/pom.xml
index bacce02..751ceb6 100644
--- a/osgi-bundles/bundles/analytics/pom.xml
+++ b/osgi-bundles/bundles/analytics/pom.xml
@@ -42,10 +42,6 @@
<artifactId>killbill-osgi-bundles-lib-killbill</artifactId>
</dependency>
<dependency>
- <groupId>com.ning.billing</groupId>
- <artifactId>killbill-util</artifactId>
- </dependency>
- <dependency>
<groupId>com.ning.billing.commons</groupId>
<artifactId>killbill-embeddeddb</artifactId>
</dependency>
@@ -98,75 +94,6 @@
<scope>test</scope>
</dependency>
<dependency>
- <groupId>com.ning.billing</groupId>
- <artifactId>killbill-account</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>com.ning.billing</groupId>
- <artifactId>killbill-catalog</artifactId>
- <type>test-jar</type>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>com.ning.billing</groupId>
- <artifactId>killbill-catalog</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>com.ning.billing</groupId>
- <artifactId>killbill-entitlement</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>com.ning.billing</groupId>
- <artifactId>killbill-entitlement</artifactId>
- <type>test-jar</type>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>com.ning.billing</groupId>
- <artifactId>killbill-junction</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>com.ning.billing</groupId>
- <artifactId>killbill-junction</artifactId>
- <type>test-jar</type>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>com.ning.billing</groupId>
- <artifactId>killbill-invoice</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>com.ning.billing</groupId>
- <artifactId>killbill-payment</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>com.ning.billing</groupId>
- <artifactId>killbill-util</artifactId>
- <type>test-jar</type>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>com.jayway.awaitility</groupId>
- <artifactId>awaitility</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>mysql</groupId>
- <artifactId>mysql-connector-mxj</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>mysql</groupId>
- <artifactId>mysql-connector-mxj-db-files</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
<scope>test</scope>
diff --git a/osgi-bundles/bundles/analytics/src/test/java/com/ning/billing/osgi/bundles/analytics/AnalyticsTestSuiteWithEmbeddedDB.java b/osgi-bundles/bundles/analytics/src/test/java/com/ning/billing/osgi/bundles/analytics/AnalyticsTestSuiteWithEmbeddedDB.java
index d417d52..17c6b79 100644
--- a/osgi-bundles/bundles/analytics/src/test/java/com/ning/billing/osgi/bundles/analytics/AnalyticsTestSuiteWithEmbeddedDB.java
+++ b/osgi-bundles/bundles/analytics/src/test/java/com/ning/billing/osgi/bundles/analytics/AnalyticsTestSuiteWithEmbeddedDB.java
@@ -17,6 +17,7 @@
package com.ning.billing.osgi.bundles.analytics;
import java.io.IOException;
+import java.io.InputStream;
import javax.sql.DataSource;
@@ -31,9 +32,11 @@ import org.testng.annotations.BeforeMethod;
import com.ning.billing.commons.embeddeddb.h2.H2EmbeddedDB;
import com.ning.billing.osgi.bundles.analytics.dao.BusinessAnalyticsSqlDao;
import com.ning.billing.osgi.bundles.analytics.dao.BusinessDBIProvider;
-import com.ning.billing.util.io.IOUtils;
import com.ning.killbill.osgi.libs.killbill.OSGIKillbillDataSource;
+import com.google.common.base.Charsets;
+import com.google.common.io.CharStreams;
+import com.google.common.io.InputSupplier;
import com.google.common.io.Resources;
public abstract class AnalyticsTestSuiteWithEmbeddedDB extends AnalyticsTestSuiteNoDB {
@@ -56,7 +59,7 @@ public abstract class AnalyticsTestSuiteWithEmbeddedDB extends AnalyticsTestSuit
killbillDataSource = new AnalyticsOSGIKillbillDataSource();
- final String ddl = IOUtils.toString(Resources.getResource("com/ning/billing/osgi/bundles/analytics/ddl.sql").openStream());
+ final String ddl = toString(Resources.getResource("com/ning/billing/osgi/bundles/analytics/ddl.sql").openStream());
embeddedDB.executeScript(ddl);
dbi = BusinessDBIProvider.get(embeddedDB.getDataSource());
@@ -68,6 +71,17 @@ public abstract class AnalyticsTestSuiteWithEmbeddedDB extends AnalyticsTestSuit
embeddedDB.stop();
}
+ public static String toString(final InputStream stream) throws IOException {
+ final InputSupplier<InputStream> inputSupplier = new InputSupplier<InputStream>() {
+ @Override
+ public InputStream getInput() throws IOException {
+ return stream;
+ }
+ };
+
+ return CharStreams.toString(CharStreams.newReaderSupplier(inputSupplier, Charsets.UTF_8));
+ }
+
private final class AnalyticsOSGIKillbillDataSource extends OSGIKillbillDataSource {
public AnalyticsOSGIKillbillDataSource() {