Skip to content

Commit

Permalink
Bumped dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
Yong Sheng Tan committed Jan 2, 2024
1 parent beb304c commit b0a5ab9
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 12 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/build-and-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ jobs:
java-version: 17
cache: maven

- run: mvn package
- run: |
printf "testcontainers.reuse.enable=true" > ~/.testcontainers.properties
./mvnw clean package
- uses: codecov/codecov-action@v3
env:
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ rsa/
target/
deploy/
datafeed.id
application-*.y*ml
application-dev.y*ml

######################
# Maven Wrapper
Expand Down
10 changes: 7 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
<dependency>
<groupId>org.finos.symphony.bdk</groupId>
<artifactId>symphony-bdk-bom</artifactId>
<version>3.0.0-RC4</version>
<version>3.0.0.RC6</version>
<type>pom</type>
<scope>import</scope>
</dependency>
Expand Down Expand Up @@ -65,7 +65,7 @@
<dependency>
<groupId>org.finos.symphony.bdk</groupId>
<artifactId>symphony-bdk-test-spring-boot</artifactId>
<version>3.0.0-RC4</version>
<version>3.0.0.RC6</version>
<scope>test</scope>
</dependency>
<dependency>
Expand All @@ -87,6 +87,7 @@
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<version>3.2.1</version>
<executions>
<execution>
<goals>
Expand Down Expand Up @@ -128,10 +129,13 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.11.0</version>
<version>3.12.1</version>
<configuration>
<source>17</source>
<target>17</target>
<compilerArgs>
<arg>-parameters</arg>
</compilerArgs>
</configuration>
</plugin>
</plugins>
Expand Down
25 changes: 18 additions & 7 deletions src/test/java/com/symphony/devrel/pollbot/BaseTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import static org.mockito.ArgumentMatchers.anyLong;
import static org.mockito.ArgumentMatchers.anyString;
import static org.mockito.Mockito.when;
import static org.springframework.test.annotation.DirtiesContext.ClassMode.BEFORE_EACH_TEST_METHOD;
import com.symphony.bdk.core.service.message.MessageService;
import com.symphony.bdk.core.service.message.model.Message;
import com.symphony.bdk.core.service.stream.StreamService;
Expand All @@ -23,19 +24,19 @@
import com.symphony.bdk.test.spring.annotation.SymphonyBdkSpringBootTest;
import com.symphony.devrel.pollbot.repository.PollRepository;
import com.symphony.devrel.pollbot.repository.PollVoteRepository;
import org.junit.jupiter.api.AfterEach;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.annotation.DirtiesContext;
import org.springframework.test.context.DynamicPropertyRegistry;
import org.springframework.test.context.DynamicPropertySource;
import org.testcontainers.containers.MongoDBContainer;
import org.testcontainers.junit.jupiter.Testcontainers;
import org.testcontainers.junit.jupiter.Container;
import java.time.Instant;
import java.util.List;
import java.util.Map;

@DirtiesContext(classMode = BEFORE_EACH_TEST_METHOD)
@SymphonyBdkSpringBootTest
@Testcontainers
@DirtiesContext(classMode = DirtiesContext.ClassMode.BEFORE_EACH_TEST_METHOD)
public class BaseTest {
@Autowired
MessageService messages;
Expand All @@ -56,12 +57,22 @@ public class BaseTest {
final V4Stream imStream = new V4Stream().streamType("IM").streamId("my-im");
final V4Stream roomStream = new V4Stream().streamType("ROOM").streamId("my-room");

@Container
static MongoDBContainer mongodb = new MongoDBContainer("mongo:6").withReuse(true);

static {
mongodb.start();
}

@DynamicPropertySource
@SuppressWarnings("resource")
public static void setDatasourceProperties(final DynamicPropertyRegistry registry) {
MongoDBContainer container = new MongoDBContainer("mongo:6");
container.start();
registry.add("spring.data.mongodb.uri", container::getReplicaSetUrl);
registry.add("spring.data.mongodb.uri", mongodb::getReplicaSetUrl);
}

@AfterEach
void afterEach() {
pollRepo.deleteAll();
pollVoteRepo.deleteAll();
}

void mockAllMessageSends() {
Expand Down
3 changes: 3 additions & 0 deletions src/test/resources/application-integration-test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
spring:
jmx.enabled: false
main.banner-mode: off

0 comments on commit b0a5ab9

Please sign in to comment.