Skip to content

Commit

Permalink
Merge pull request eugenp#7791 from lukaszrys/feature/BAEL-1869_fix_t…
Browse files Browse the repository at this point in the history
…ests

[ BAEL-1869 ]: Fix Couchbase tests
  • Loading branch information
eric-martin authored Sep 15, 2019
2 parents 16c90ae + 32e77c7 commit 9f2f00e
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.mongo.MongoAutoConfiguration;

@SpringBootApplication
@SpringBootApplication(exclude = MongoAutoConfiguration.class)
public class ReactiveCouchbaseApplication {

public static void main(String[] args) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
package com.baeldung.couchbase.configuration;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.PropertySource;

import java.util.Collections;
import java.util.List;

@Configuration
@PropertySource("classpath:couchbase.properties")
public class CouchbaseProperties {

private final List<String> bootstrapHosts;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
spring.couchbase.bucket.name=default
spring.couchbase.bootstrap-hosts=localhost
spring.couchbase.port=8091
spring.couchbase.bucket.password=123456
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
import java.util.UUID;

@RunWith(SpringRunner.class)
@SpringBootTest
@SpringBootTest(properties = {"spring.autoconfigure.exclude=org.springframework.boot.autoconfigure.mongo.embedded.EmbeddedMongoAutoConfiguration"})
public class N1QLPersonRepositoryLiveTest {

@Autowired private N1QLPersonRepository personRepository;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
import java.util.UUID;

@RunWith(SpringRunner.class)
@SpringBootTest
@SpringBootTest(properties = {"spring.autoconfigure.exclude=org.springframework.boot.autoconfigure.mongo.embedded.EmbeddedMongoAutoConfiguration"})
public class N1QLSortingPersonRepositoryLiveTest {

@Autowired private N1QLSortingPersonRepository personRepository;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringRunner;
import reactor.core.publisher.Flux;
import reactor.core.publisher.Mono;
Expand All @@ -16,7 +17,8 @@
import java.util.UUID;

@RunWith(SpringRunner.class)
@SpringBootTest(properties = { "spring.couchbase.port=10010" }, classes = { ViewReactiveCouchbaseConfiguration.class, CouchbaseProperties.class, CouchbaseMockConfiguration.class })
@SpringBootTest(properties = { "spring.couchbase.port=10010", "spring.autoconfigure.exclude=org.springframework.boot.autoconfigure.mongo.embedded.EmbeddedMongoAutoConfiguration,org.springframework.boot.autoconfigure.mongo.MongoAutoConfiguration" },
classes = { CouchbaseMockConfiguration.class, ViewReactiveCouchbaseConfiguration.class, CouchbaseProperties.class })
public class ViewPersonRepositoryIntegrationTest {

@Autowired private ViewPersonRepository personRepository;
Expand Down

0 comments on commit 9f2f00e

Please sign in to comment.