Skip to content

Commit

Permalink
Enable Tests using VirtualThreads for java 21 onwards.
Browse files Browse the repository at this point in the history
This commit updates tests using virtual threads to run for java versions 21+.

See: #665
  • Loading branch information
christophstrobl committed Aug 21, 2024
1 parent 3953888 commit 7f3d39d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.condition.EnabledOnJre;
import org.junit.jupiter.api.condition.EnabledForJreRange;
import org.junit.jupiter.api.condition.JRE;

import org.springframework.beans.factory.annotation.Autowired;
Expand All @@ -41,7 +41,7 @@
*/
@Transactional
@SpringBootTest(properties = "spring.threads.virtual.enabled=true")
@EnabledOnJre(JRE.JAVA_21)
@EnabledForJreRange(min = JRE.JAVA_21)
class VirtualThreadsTests {

@Autowired SimpleUserRepository repository;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,8 @@
import java.util.concurrent.TimeUnit;

import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.condition.EnabledOnJre;
import org.junit.jupiter.api.condition.EnabledForJreRange;
import org.junit.jupiter.api.condition.JRE;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.core.task.AsyncTaskExecutor;
Expand All @@ -39,7 +38,7 @@
* @author Mark Paluch
*/
@SpringBootTest(properties = "spring.threads.virtual.enabled=true")
@EnabledOnJre(JRE.JAVA_21)
@EnabledForJreRange(min = JRE.JAVA_21)
public class PubSubVirtualThreadsTests {

@Autowired RedisConnectionFactory connectionFactory;
Expand Down

0 comments on commit 7f3d39d

Please sign in to comment.