Skip to content

Commit

Permalink
Merge pull request #42 from datadrivencz/remove-reference-conf-from-c…
Browse files Browse the repository at this point in the history
…ore-testjar

[proxima-core] remove reference.conf from test-jar
  • Loading branch information
je-ik committed Mar 1, 2018
2 parents 37964a0 + 4291ddf commit a76be59
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,9 @@
public class CommitLogReaderTest {

private final transient Repository repo = Repository.Builder.of(
ConfigFactory.load().resolve()).build();
ConfigFactory.load()
.withFallback(ConfigFactory.load("test-reference.conf"))
.resolve()).build();

private transient LocalExecutor executor;
private final transient EntityDescriptor entity = repo.findEntity("event").get();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,10 @@
public class PartitionedViewTest implements Serializable {

private final transient Repository repo = Repository.Builder.of(
ConfigFactory.load().resolve()).build();

ConfigFactory.load()
.withFallback(ConfigFactory.load("test-reference.conf"))
.resolve()).build();

private transient LocalExecutor executor;
private final transient EntityDescriptor entity = repo.findEntity("event").get();
private final transient AttributeDescriptor<?> attr = entity.findAttribute("data").get();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,10 @@
*/
public class RepositoryTest {

final Repository repo = Repository.Builder.of(ConfigFactory.load().resolve()).build();
final Repository repo = Repository.Builder.of(
ConfigFactory.load()
.withFallback(ConfigFactory.load("test-reference.conf"))
.resolve()).build();

@Test
public void testConfigParsing() throws IOException {
Expand Down Expand Up @@ -134,7 +137,6 @@ public boolean onError(Throwable error) {

@Test
public void testProxyRandomGet() throws UnsupportedEncodingException, InterruptedException {
Repository repo = Repository.Builder.of(ConfigFactory.load().resolve()).build();
EntityDescriptor proxied = repo.findEntity("proxied").get();
AttributeDescriptor<?> target = proxied.findAttribute("_e.*", true).get();
AttributeDescriptor<?> source = proxied.findAttribute("event.*").get();
Expand Down Expand Up @@ -165,7 +167,6 @@ public void testProxyRandomGet() throws UnsupportedEncodingException, Interrupte

@Test
public void testProxyScan() throws UnsupportedEncodingException, InterruptedException {
Repository repo = Repository.Builder.of(ConfigFactory.load().resolve()).build();
EntityDescriptor proxied = repo.findEntity("proxied").get();
AttributeDescriptor<?> source = proxied.findAttribute("event.*").get();
Set<AttributeFamilyDescriptor> proxiedFamilies = repo
Expand Down Expand Up @@ -206,7 +207,6 @@ public void testProxyScan() throws UnsupportedEncodingException, InterruptedExce

@Test
public void testProxyCachedView() throws UnsupportedEncodingException {
Repository repo = Repository.Builder.of(ConfigFactory.load().resolve()).build();
EntityDescriptor proxied = repo.findEntity("proxied").get();
AttributeDescriptor<?> target = proxied.findAttribute("_e.*", true).get();
AttributeDescriptor<?> source = proxied.findAttribute("event.*").get();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,10 @@
*/
public class MultiAccessBuilderTest {

final Repository repo = Repository.of(ConfigFactory.load().resolve());
final Repository repo = Repository.Builder.of(
ConfigFactory.load()
.withFallback(ConfigFactory.load("test-reference.conf"))
.resolve()).build();

RandomAccessReader reader;
long now;
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,10 @@ public class IngestServiceTest {

@Before
public void setup() throws InterruptedException {
server = new IngestServer(ConfigFactory.load().resolve());
server = new IngestServer(
ConfigFactory.load()
.withFallback(ConfigFactory.load("test-reference.conf"))
.resolve());
ingest = server.new IngestService();
server.startConsumerThreads();
latch = new CountDownLatch(1);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,10 @@ public class RetrieveServiceTest {

@Before
public void setup() throws InterruptedException {
server = new IngestServer(ConfigFactory.load().resolve());
server = new IngestServer(
ConfigFactory.load()
.withFallback(ConfigFactory.load("test-reference.conf"))
.resolve());
retrieve = server.new RetrieveService();
server.startConsumerThreads();
}
Expand Down

0 comments on commit a76be59

Please sign in to comment.