Skip to content

Commit

Permalink
Merge pull request #107 from zalando-nakadi/feature/remove-duplicated…
Browse files Browse the repository at this point in the history
…-postgres-in-example-app

remove duplicated embedded database in our example app
  • Loading branch information
ePaul authored Dec 19, 2018
2 parents 543a095 + 1f39198 commit b598127
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ public static void main(String[] args) throws Exception {

@Bean
@Primary
public DataSource dataSource() throws IOException {
return embeddedPostgres().getPostgresDatabase();
public DataSource dataSource(EmbeddedPostgres postgres) throws IOException {
return postgres.getPostgresDatabase();
}

@Bean
Expand All @@ -39,9 +39,9 @@ public EmbeddedPostgres embeddedPostgres() throws IOException {
public SnapshotEventGenerator snapshotEventGenerator() {
return new SimpleSnapshotEventGenerator("eventtype", (withIdGreaterThan, filter) -> {
if (withIdGreaterThan == null) {
return Collections.singletonList(new Snapshot("1", "foo", (Object) filter));
return Collections.singletonList(new Snapshot("1", "foo", filter));
} else if (withIdGreaterThan.equals("1")) {
return Collections.singletonList(new Snapshot("2", "foo", (Object) filter));
return Collections.singletonList(new Snapshot("2", "foo", filter));
} else {
return new ArrayList<>();
}
Expand Down

0 comments on commit b598127

Please sign in to comment.