Created
March 9, 2021 14:04
-
-
Save mihaita-tinta/803a08a1cc866c19c2aa1eb1c5fc4be8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.mihaita.articles.caching; | |
import org.junit.jupiter.api.Test; | |
import org.junit.jupiter.api.extension.ExtendWith; | |
import org.slf4j.Logger; | |
import org.slf4j.LoggerFactory; | |
import org.springframework.beans.factory.annotation.Autowired; | |
import org.springframework.boot.test.context.SpringBootTest; | |
import org.springframework.test.context.junit.jupiter.SpringExtension; | |
import java.util.stream.IntStream; | |
@SpringBootTest(classes = {MyServiceTestConfiguration.class, MyCacheConfiguration.class}, | |
properties = {"logging.level.org.springframework.cache=TRACE", | |
"logging.level.com.mihaita.articles.caching=TRACE"}) | |
@ExtendWith(SpringExtension.class) | |
class MyServiceTest { | |
private static final Logger log = LoggerFactory.getLogger(MyServiceTest.class); | |
@Autowired | |
MyServiceTestConfiguration.MyService service; | |
@Test | |
public void test() { | |
IntStream.range(0, 10) | |
.forEach(i -> service.getStuffById(1)); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment