File tree Expand file tree Collapse file tree
rqueue-spring-boot-starter/src/test/java/com/github/sonus21/rqueue/spring/boot/application
rqueue-spring-common-test/src/main/java/com/github/sonus21/rqueue/test/application
src/main/java/com/github/sonus21/junit Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3737 mockitoVersion = " 3.5.0"
3838 hamcrestVersion = " 2.2"
3939 jacocoVersion = " 0.8.8"
40- embeddedRedisVersion = " 0.7.2 "
40+ embeddedRedisVersion = " 1.4.3 "
4141 h2Version = " 2.1.214"
4242 tomcatVersion = " 10.1.4"
4343
Original file line number Diff line number Diff line change 3131import org .springframework .data .jpa .repository .config .EnableJpaRepositories ;
3232import org .springframework .data .redis .connection .RedisConnectionFactory ;
3333import org .springframework .transaction .annotation .EnableTransactionManagement ;
34+ import java .io .IOException ;
3435
3536@ PropertySource ("classpath:application.properties" )
3637@ SpringBootApplication (scanBasePackages = {"com.github.sonus21.rqueue.test" })
@@ -47,7 +48,7 @@ public static void main(String[] args) {
4748
4849 @ PostConstruct
4950 @ Override
50- public void postConstruct () {
51+ public void postConstruct () throws IOException {
5152 init ();
5253 monitor (redisHost , redisPort );
5354 }
Original file line number Diff line number Diff line change 2121import com .github .sonus21 .junit .BootstrapRedis ;
2222import com .github .sonus21 .junit .RedisBootstrapperBase ;
2323import com .github .sonus21 .rqueue .utils .SerializationUtils ;
24+ import java .io .IOException ;
2425import java .util .HashMap ;
2526import javax .sql .DataSource ;
2627import lombok .extern .slf4j .Slf4j ;
@@ -55,7 +56,7 @@ public abstract class ApplicationBasicConfiguration extends RedisBootstrapperBas
5556 @ Value ("${rqueue.reactive.enabled:false}" )
5657 protected boolean reactiveEnabled ;
5758
58- protected void init () {
59+ protected void init () throws IOException {
5960 final BootstrapRedis bootstrapRedis =
6061 Javanna .createAnnotation (
6162 BootstrapRedis .class ,
Original file line number Diff line number Diff line change 1919import com .github .sonus21 .rqueue .config .SimpleRqueueListenerContainerFactory ;
2020import jakarta .annotation .PostConstruct ;
2121import jakarta .annotation .PreDestroy ;
22+ import java .io .IOException ;
2223import java .nio .charset .StandardCharsets ;
2324import java .util .Collections ;
2425import org .springframework .context .annotation .Bean ;
2930public abstract class ApplicationWithCustomMessageConverter extends ApplicationBasicConfiguration {
3031
3132 @ PostConstruct
32- public void postConstruct () {
33+ public void postConstruct () throws IOException {
3334 init ();
3435 }
3536
3637 @ PreDestroy
37- public void preDestroy () {
38+ public void preDestroy () throws IOException {
3839 cleanup ();
3940 }
4041
Original file line number Diff line number Diff line change 2323import org .springframework .data .redis .connection .RedisConnectionFactory ;
2424import org .springframework .data .redis .connection .lettuce .LettuceConnectionFactory ;
2525import org .springframework .data .redis .listener .RedisMessageListenerContainer ;
26+ import java .io .IOException ;
2627
2728@ Slf4j
2829public abstract class BaseApplication extends ApplicationBasicConfiguration {
2930
3031 @ PostConstruct
31- public void postConstruct () {
32+ public void postConstruct () throws IOException {
3233 init ();
3334 }
3435
3536 @ PreDestroy
36- public void preDestroy () {
37+ public void preDestroy () throws IOException {
3738 cleanup ();
3839 }
3940
Original file line number Diff line number Diff line change 2424import jakarta .annotation .PreDestroy ;
2525import org .springframework .beans .factory .annotation .Value ;
2626import org .springframework .context .annotation .Bean ;
27+ import java .io .IOException ;
2728
2829public abstract class BaseApplicationWithBackoff extends ApplicationBasicConfiguration {
2930
@@ -37,12 +38,12 @@ public abstract class BaseApplicationWithBackoff extends ApplicationBasicConfigu
3738 private int exponentialBackoffInitialInterval ;
3839
3940 @ PostConstruct
40- public void postConstruct () {
41+ public void postConstruct () throws IOException {
4142 init ();
4243 }
4344
4445 @ PreDestroy
45- public void preDestroy () {
46+ public void preDestroy () throws IOException {
4647 cleanup ();
4748 }
4849
Original file line number Diff line number Diff line change 2727import org .springframework .data .redis .connection .lettuce .LettuceConnectionFactory ;
2828import org .springframework .data .redis .listener .RedisMessageListenerContainer ;
2929import redis .embedded .RedisServer ;
30+ import java .io .IOException ;
3031
3132@ Slf4j
3233public abstract class MultiRedisSprigBaseApplication extends ApplicationBasicConfiguration {
@@ -40,7 +41,7 @@ public abstract class MultiRedisSprigBaseApplication extends ApplicationBasicCon
4041 private RedisServer redisServer2 ;
4142
4243 @ PostConstruct
43- public void postConstruct () {
44+ public void postConstruct () throws IOException {
4445 init ();
4546 if (redisServer2 == null ) {
4647 redisServer2 = new RedisServer (redisPort2 );
@@ -50,7 +51,7 @@ public void postConstruct() {
5051 }
5152
5253 @ PreDestroy
53- public void preDestroy () {
54+ public void preDestroy () throws IOException {
5455 cleanup ();
5556 if (redisServer2 != null ) {
5657 redisServer2 .stop ();
Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ dependencies {
2222 // https://mvnrepository.com/artifact/jakarta.persistence/jakarta.persistence-api
2323 api " jakarta.persistence:jakarta.persistence-api:${ jakartaPersistenceVersion} "
2424 api " com.h2database:h2:${ h2Version} "
25- api " it.ozimov :embedded-redis:${ embeddedRedisVersion} "
25+ api " com.github.codemonstur :embedded-redis:${ embeddedRedisVersion} "
2626 // https://mvnrepository.com/artifact/org.springframework.data/spring-data-jpa
2727 api " org.springframework.data:spring-data-jpa:${ springDataVersion} "
2828
Original file line number Diff line number Diff line change 1717package com .github .sonus21 .junit ;
1818
1919import java .io .BufferedReader ;
20+ import java .io .IOException ;
2021import java .io .InputStreamReader ;
2122import java .util .ArrayList ;
2223import java .util .LinkedList ;
@@ -40,7 +41,7 @@ public abstract class RedisBootstrapperBase {
4041 protected ExecutorService executorService ;
4142 protected List <MonitorProcess > processes = new ArrayList <>();
4243
43- protected void bootstrap (BootstrapRedis bootstrapRedis ) {
44+ protected void bootstrap (BootstrapRedis bootstrapRedis ) throws IOException {
4445 int monitorThreads = 0 ;
4546 if (bootstrapRedis .monitorRedis ()) {
4647 if (bootstrapRedis .monitorThreadsCount () > 0 ) {
@@ -62,7 +63,7 @@ protected void bootstrap(BootstrapRedis bootstrapRedis) {
6263 }
6364 }
6465
65- protected void cleanup () {
66+ protected void cleanup () throws IOException {
6667 if (redisServer != null ) {
6768 redisServer .stop ();
6869 }
You can’t perform that action at this time.
0 commit comments