|
38 | 38 | import org.jooq.TransactionalRunnable;
|
39 | 39 | import org.jooq.VisitListener;
|
40 | 40 | import org.jooq.VisitListenerProvider;
|
| 41 | +import org.jooq.impl.DefaultExecuteListenerProvider; |
41 | 42 | import org.junit.Test;
|
42 | 43 |
|
43 | 44 | import org.springframework.boot.autoconfigure.AutoConfigurations;
|
44 | 45 | import org.springframework.boot.jdbc.DataSourceBuilder;
|
45 | 46 | import org.springframework.boot.test.context.runner.ApplicationContextRunner;
|
46 | 47 | import org.springframework.context.annotation.Bean;
|
47 | 48 | import org.springframework.context.annotation.Configuration;
|
| 49 | +import org.springframework.core.annotation.Order; |
48 | 50 | import org.springframework.dao.DataIntegrityViolationException;
|
49 | 51 | import org.springframework.jdbc.datasource.DataSourceTransactionManager;
|
50 | 52 | import org.springframework.transaction.PlatformTransactionManager;
|
@@ -150,8 +152,13 @@ public void customProvidersArePickedUp() {
|
150 | 152 | .isEqualTo(TestExecutorProvider.class);
|
151 | 153 | assertThat(dsl.configuration().recordListenerProviders().length)
|
152 | 154 | .isEqualTo(1);
|
153 |
| - assertThat(dsl.configuration().executeListenerProviders().length) |
154 |
| - .isEqualTo(2); |
| 155 | + ExecuteListenerProvider[] executeListenerProviders = dsl |
| 156 | + .configuration().executeListenerProviders(); |
| 157 | + assertThat(executeListenerProviders.length).isEqualTo(2); |
| 158 | + assertThat(executeListenerProviders[0]) |
| 159 | + .isInstanceOf(DefaultExecuteListenerProvider.class); |
| 160 | + assertThat(executeListenerProviders[1]) |
| 161 | + .isInstanceOf(TestExecuteListenerProvider.class); |
155 | 162 | assertThat(dsl.configuration().visitListenerProviders().length)
|
156 | 163 | .isEqualTo(1);
|
157 | 164 | assertThat(dsl.configuration().transactionListenerProviders().length)
|
@@ -260,6 +267,7 @@ public RecordListener provide() {
|
260 | 267 |
|
261 | 268 | }
|
262 | 269 |
|
| 270 | + @Order(100) |
263 | 271 | protected static class TestExecuteListenerProvider
|
264 | 272 | implements ExecuteListenerProvider {
|
265 | 273 |
|
|
0 commit comments