Skip to content

Commit

Permalink
feat: enable caching with Caffeine and update test configuration for …
Browse files Browse the repository at this point in the history
…improved performance
  • Loading branch information
LeonardoMeireles55 committed Feb 1, 2025
1 parent 5891272 commit d07818c
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
2 changes: 2 additions & 0 deletions src/main/resources/application-test.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
# ===============================
server.port=8080
server.error.include-stacktrace=never
spring.cache.type=caffeine
spring.cache.caffeine.spec=maximumSize=500, expireAfterWrite=5m

# ===============================
# = DATABASE CONFIGURATION
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,17 @@

import org.junit.jupiter.api.Test;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.cache.annotation.EnableCaching;
import org.springframework.data.web.config.EnableSpringDataWebSupport;
import org.springframework.test.context.ActiveProfiles;

@EnableCaching
@EnableSpringDataWebSupport(
pageSerializationMode = EnableSpringDataWebSupport.PageSerializationMode.VIA_DTO)
@SpringBootTest
@ActiveProfiles("test")
class ControlApplicationTests {

@Test
void contextLoads() {
}
@Test
void contextLoads() {}
}
Original file line number Diff line number Diff line change
Expand Up @@ -138,4 +138,5 @@ void getMeanAndStandardDeviation_return_result() throws Exception {
verify(hematologyAnalyticsService).calculateMeanAndStandardDeviation(eq("Hemoglobin"),
eq("High"), eq(startDate), eq(endDate), any(Pageable.class));
}

}

0 comments on commit d07818c

Please sign in to comment.