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
/* | |
* Copyright 2002-2021 the original author or authors. | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* https://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software |
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.example; | |
import javax.sql.DataSource; | |
import com.example.TransactionTest.MyTestExecutionListener; | |
import lombok.Data; | |
import lombok.extern.slf4j.Slf4j; | |
import org.junit.jupiter.api.MethodOrderer.OrderAnnotation; | |
import org.junit.jupiter.api.Order; | |
import org.junit.jupiter.api.Test; |
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
@Slf4j | |
public class MyImageNameSubstitutor extends ImageNameSubstitutor { | |
public static final String ENV_VAR_KEY = "MY_TESTCONTAINERS_REGISTRY"; | |
public static final String SYSTEM_PROP_KEY = "my.testcontainers.registry"; | |
public static final String DEFAULT_REGISTRY = "sample.com/"; | |
protected String registryUrl; |
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.example.analysis; | |
import java.io.IOException; | |
import java.io.InputStream; | |
import java.util.Collections; | |
import java.util.Comparator; | |
import java.util.HashSet; | |
import java.util.LinkedHashMap; | |
import java.util.List; | |
import java.util.Map; |
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
java.util.ConcurrentModificationException: null | |
at java.base/java.util.HashMap.computeIfAbsent(HashMap.java:1134) ~[na:na] | |
Suppressed: reactor.core.publisher.FluxOnAssembly$OnAssemblyException: | |
Error has been observed at the following site(s): | |
|_ checkpoint ⇢ SQL "INSERT INTO city (name, country) VALUES ($1, $2)" [DatabaseClient] | |
Stack trace: | |
at java.base/java.util.HashMap.computeIfAbsent(HashMap.java:1134) ~[na:na] | |
at io.r2dbc.postgresql.IndefiniteStatementCache.getName(IndefiniteStatementCache.java:49) ~[r2dbc-postgresql-0.8.0.RELEASE.jar:0.8.0.RELEASE] | |
at io.r2dbc.postgresql.ExtendedQueryPostgresqlStatement.execute(ExtendedQueryPostgresqlStatement.java:184) ~[r2dbc-postgresql-0.8.0.RELEASE.jar:0.8.0.RELEASE] | |
at io.r2dbc.postgresql.ExtendedQueryPostgresqlStatement.execute(ExtendedQueryPostgresqlStatement.java:123) ~[r2dbc-postgresql-0.8.0.RELEASE.jar:0.8.0.RELEASE] |
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
/** | |
* @author Tadaya Tsuyukubo | |
*/ | |
@SpringBootApplication | |
public class Application { | |
public static void main(String[] args) { | |
SpringApplication app = new SpringApplication(Application.class); | |
app.setWebApplicationType(WebApplicationType.NONE); | |
app.run(args); |
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 io.r2dbc.examples; | |
import java.lang.reflect.Constructor; | |
import java.lang.reflect.Method; | |
import io.r2dbc.proxy.callback.BatchCallbackHandler; | |
import io.r2dbc.proxy.callback.CallbackHandler; | |
import io.r2dbc.proxy.callback.ConnectionCallbackHandler; | |
import io.r2dbc.proxy.callback.ConnectionFactoryCallbackHandler; | |
import io.r2dbc.proxy.callback.ProxyConfig; |
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
class Pointcut { | |
// pointcut for ConnectionFactory#create() method | |
public Publisher<? extends Connection> pointcut() { | |
Publisher<? extends Connection> result = null; // actual result of "ConnectionFactory#create()" | |
ProxyFactory proxyFactory = null; // need to construct | |
// return wrapped one | |
return Flux.from(result) |
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
public class MyLogEntryCreator extends DefaultQueryLogEntryCreator { | |
private boolean writeDataSourcename = false; | |
private boolean writeConnectionId = true; | |
public String getLogEntry(String sessionId, ExecutionInfo execInfo, List<QueryInfo> queryInfoList) { | |
StringBuilder sb = new StringBuilder(); | |
sb.append("SessionId=" + sessionId); | |
sb.append(" "); | |
sb.append(super.getLogEntry(execInfo, queryInfoList, this.writeDataSourcename, this.writeConnectionId)); |
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
public class TestContext { | |
private CountDownLatch latch; | |
private LocalDateTime expireAt; | |
private volatile Throwable error; | |
public TestContext(int count) { | |
this(count, XenonTestConfig.timeoutStrategy.getTimeout()); | |
} | |
public TestContext(int count, Duration duration) { |
NewerOlder