mirror of
https://github.com/google/nomulus.git
synced 2025-07-25 20:18:34 +02:00
Compile Nomulus with Java 21 (#2344)
Make the necessary changes for the code base to compile with JDK 21. Other changes: 1. Upgraded testcontainer version and the SQL image version (to be the same as what we use in Cloud SQL). This led to some schema changes and also changed the order of results in some test queries (for the better I think, as the new order appears to be alphabetical). 2. Remove dependency on Truth8, which is deprecated. 3. Enable parallel Gradle task execution and greatly increased the number of parallel tests in standardTest. Removed outcastTest.
This commit is contained in:
parent
fbe0f4e0f2
commit
dcf0412f11
112 changed files with 558 additions and 239 deletions
2
.github/workflows/codeql.yml
vendored
2
.github/workflows/codeql.yml
vendored
|
@ -33,7 +33,7 @@ jobs:
|
||||||
uses: actions/setup-java@v3
|
uses: actions/setup-java@v3
|
||||||
with:
|
with:
|
||||||
distribution: 'temurin'
|
distribution: 'temurin'
|
||||||
java-version: '17'
|
java-version: '21'
|
||||||
|
|
||||||
# Initializes the CodeQL tools for scanning.
|
# Initializes the CodeQL tools for scanning.
|
||||||
- name: Initialize CodeQL
|
- name: Initialize CodeQL
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
17
|
21
|
||||||
|
|
23
build.gradle
23
build.gradle
|
@ -281,6 +281,12 @@ def javadocSource = []
|
||||||
def javadocClasspath = []
|
def javadocClasspath = []
|
||||||
def javadocDependentTasks = []
|
def javadocDependentTasks = []
|
||||||
|
|
||||||
|
def services = [':services:default',
|
||||||
|
':services:backend',
|
||||||
|
':services:bsa',
|
||||||
|
':services:tools',
|
||||||
|
':services:pubapi']
|
||||||
|
|
||||||
subprojects {
|
subprojects {
|
||||||
// Skip no-op project
|
// Skip no-op project
|
||||||
if (project.name == 'services') return
|
if (project.name == 'services') return
|
||||||
|
@ -365,12 +371,6 @@ subprojects {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
def services = [':services:default',
|
|
||||||
':services:backend',
|
|
||||||
':services:bsa',
|
|
||||||
':services:tools',
|
|
||||||
':services:pubapi']
|
|
||||||
|
|
||||||
// Set up all of the deployment projects.
|
// Set up all of the deployment projects.
|
||||||
if (services.contains(project.path)) {
|
if (services.contains(project.path)) {
|
||||||
|
|
||||||
|
@ -412,9 +412,9 @@ subprojects {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// No need to produce javadoc for the docs subproject, which has no APIs to
|
// No need to produce javadoc for the jetty subproject, which has no APIs to
|
||||||
// expose to users.
|
// expose to users.
|
||||||
if (project.name != 'docs') {
|
if (project.name != 'jetty') {
|
||||||
javadocSource << project.sourceSets.main.allJava
|
javadocSource << project.sourceSets.main.allJava
|
||||||
javadocClasspath << project.sourceSets.main.runtimeClasspath
|
javadocClasspath << project.sourceSets.main.runtimeClasspath
|
||||||
javadocClasspath << "${buildDir}/generated/sources/annotationProcessor/java/main"
|
javadocClasspath << "${buildDir}/generated/sources/annotationProcessor/java/main"
|
||||||
|
@ -422,6 +422,13 @@ subprojects {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Force SDK download to be sequential, otherwise parallel tasks will try to
|
||||||
|
// write to the same location to upgrade gcloud and fail.
|
||||||
|
for (int i = 1; i < services.size(); i++) {
|
||||||
|
project("${services[i]}").downloadCloudSdk
|
||||||
|
.dependsOn(project("${services[i - 1]}").downloadCloudSdk)
|
||||||
|
}
|
||||||
|
|
||||||
// If "-P verboseTestOutput=true" is passed in, configure all subprojects to dump all of their
|
// If "-P verboseTestOutput=true" is passed in, configure all subprojects to dump all of their
|
||||||
// output and final test status (pass/fail, errors) for each test class.
|
// output and final test status (pass/fail, errors) for each test class.
|
||||||
//
|
//
|
||||||
|
|
|
@ -104,8 +104,6 @@ dependencies {
|
||||||
implementation(deps["org.apache.commons:commons-text"]!!)
|
implementation(deps["org.apache.commons:commons-text"]!!)
|
||||||
annotationProcessor(deps["com.google.auto.value:auto-value"]!!)
|
annotationProcessor(deps["com.google.auto.value:auto-value"]!!)
|
||||||
testImplementation(deps["com.google.truth:truth"]!!)
|
testImplementation(deps["com.google.truth:truth"]!!)
|
||||||
testImplementation(
|
|
||||||
deps["com.google.truth.extensions:truth-java8-extension"]!!)
|
|
||||||
testImplementation(deps["org.junit.jupiter:junit-jupiter-api"]!!)
|
testImplementation(deps["org.junit.jupiter:junit-jupiter-api"]!!)
|
||||||
testImplementation(deps["org.junit.jupiter:junit-jupiter-engine"]!!)
|
testImplementation(deps["org.junit.jupiter:junit-jupiter-engine"]!!)
|
||||||
testImplementation(deps["org.mockito:mockito-core"]!!)
|
testImplementation(deps["org.mockito:mockito-core"]!!)
|
||||||
|
|
|
@ -16,7 +16,6 @@ package google.registry.gradle.plugin;
|
||||||
|
|
||||||
import static com.google.common.collect.ImmutableMap.toImmutableMap;
|
import static com.google.common.collect.ImmutableMap.toImmutableMap;
|
||||||
import static com.google.common.truth.Truth.assertThat;
|
import static com.google.common.truth.Truth.assertThat;
|
||||||
import static com.google.common.truth.Truth8.assertThat;
|
|
||||||
import static google.registry.gradle.plugin.GcsPluginUtils.toByteArraySupplier;
|
import static google.registry.gradle.plugin.GcsPluginUtils.toByteArraySupplier;
|
||||||
import static java.nio.charset.StandardCharsets.UTF_8;
|
import static java.nio.charset.StandardCharsets.UTF_8;
|
||||||
|
|
||||||
|
|
|
@ -12,7 +12,7 @@ com.google.auto:auto-common:1.2.1=annotationProcessor,errorprone,testAnnotationP
|
||||||
com.google.code.findbugs:jsr305:3.0.2=annotationProcessor,checkstyle,compileClasspath,deploy_jar,errorprone,runtimeClasspath,testAnnotationProcessor,testCompileClasspath,testRuntimeClasspath,testing,testingAnnotationProcessor,testingCompileClasspath
|
com.google.code.findbugs:jsr305:3.0.2=annotationProcessor,checkstyle,compileClasspath,deploy_jar,errorprone,runtimeClasspath,testAnnotationProcessor,testCompileClasspath,testRuntimeClasspath,testing,testingAnnotationProcessor,testingCompileClasspath
|
||||||
com.google.errorprone:error_prone_annotation:2.23.0=annotationProcessor,errorprone,testAnnotationProcessor,testingAnnotationProcessor
|
com.google.errorprone:error_prone_annotation:2.23.0=annotationProcessor,errorprone,testAnnotationProcessor,testingAnnotationProcessor
|
||||||
com.google.errorprone:error_prone_annotations:2.23.0=annotationProcessor,errorprone,testAnnotationProcessor,testingAnnotationProcessor
|
com.google.errorprone:error_prone_annotations:2.23.0=annotationProcessor,errorprone,testAnnotationProcessor,testingAnnotationProcessor
|
||||||
com.google.errorprone:error_prone_annotations:2.24.1=compileClasspath,deploy_jar,runtimeClasspath,testCompileClasspath,testRuntimeClasspath,testing,testingCompileClasspath
|
com.google.errorprone:error_prone_annotations:2.25.0=compileClasspath,deploy_jar,runtimeClasspath,testCompileClasspath,testRuntimeClasspath,testing,testingCompileClasspath
|
||||||
com.google.errorprone:error_prone_annotations:2.7.1=checkstyle
|
com.google.errorprone:error_prone_annotations:2.7.1=checkstyle
|
||||||
com.google.errorprone:error_prone_check_api:2.23.0=annotationProcessor,errorprone,testAnnotationProcessor,testingAnnotationProcessor
|
com.google.errorprone:error_prone_check_api:2.23.0=annotationProcessor,errorprone,testAnnotationProcessor,testingAnnotationProcessor
|
||||||
com.google.errorprone:error_prone_core:2.23.0=annotationProcessor,errorprone,testAnnotationProcessor,testingAnnotationProcessor
|
com.google.errorprone:error_prone_core:2.23.0=annotationProcessor,errorprone,testAnnotationProcessor,testingAnnotationProcessor
|
||||||
|
@ -30,7 +30,7 @@ com.google.inject:guice:5.1.0=annotationProcessor,errorprone,testAnnotationProce
|
||||||
com.google.j2objc:j2objc-annotations:1.3=checkstyle
|
com.google.j2objc:j2objc-annotations:1.3=checkstyle
|
||||||
com.google.j2objc:j2objc-annotations:2.8=compileClasspath,testCompileClasspath,testingCompileClasspath
|
com.google.j2objc:j2objc-annotations:2.8=compileClasspath,testCompileClasspath,testingCompileClasspath
|
||||||
com.google.protobuf:protobuf-java:3.19.6=annotationProcessor,errorprone,testAnnotationProcessor,testingAnnotationProcessor
|
com.google.protobuf:protobuf-java:3.19.6=annotationProcessor,errorprone,testAnnotationProcessor,testingAnnotationProcessor
|
||||||
com.google.truth:truth:1.4.1=compileClasspath,deploy_jar,runtimeClasspath,testCompileClasspath,testRuntimeClasspath,testing,testingCompileClasspath
|
com.google.truth:truth:1.4.2=compileClasspath,deploy_jar,runtimeClasspath,testCompileClasspath,testRuntimeClasspath,testing,testingCompileClasspath
|
||||||
com.puppycrawl.tools:checkstyle:9.3=checkstyle
|
com.puppycrawl.tools:checkstyle:9.3=checkstyle
|
||||||
commons-beanutils:commons-beanutils:1.9.4=checkstyle
|
commons-beanutils:commons-beanutils:1.9.4=checkstyle
|
||||||
commons-collections:commons-collections:3.2.2=checkstyle
|
commons-collections:commons-collections:3.2.2=checkstyle
|
||||||
|
|
|
@ -14,7 +14,6 @@
|
||||||
|
|
||||||
package google.registry.testing;
|
package google.registry.testing;
|
||||||
|
|
||||||
import com.github.benmanes.caffeine.cache.CacheLoader;
|
|
||||||
import com.github.benmanes.caffeine.cache.Caffeine;
|
import com.github.benmanes.caffeine.cache.Caffeine;
|
||||||
import com.github.benmanes.caffeine.cache.LoadingCache;
|
import com.github.benmanes.caffeine.cache.LoadingCache;
|
||||||
import com.google.common.flogger.FluentLogger;
|
import com.google.common.flogger.FluentLogger;
|
||||||
|
@ -31,28 +30,25 @@ public final class SystemInfo {
|
||||||
private static final LoadingCache<String, Boolean> hasCommandCache =
|
private static final LoadingCache<String, Boolean> hasCommandCache =
|
||||||
Caffeine.newBuilder()
|
Caffeine.newBuilder()
|
||||||
.build(
|
.build(
|
||||||
new CacheLoader<String, Boolean>() {
|
cmd -> {
|
||||||
@Override
|
try {
|
||||||
public Boolean load(String cmd) throws InterruptedException {
|
Process pid = Runtime.getRuntime().exec(cmd.split(" "));
|
||||||
try {
|
pid.getOutputStream().close();
|
||||||
Process pid = Runtime.getRuntime().exec(cmd);
|
pid.waitFor();
|
||||||
pid.getOutputStream().close();
|
} catch (IOException e) {
|
||||||
pid.waitFor();
|
logger.atWarning().withCause(e).log("%s command not available.", cmd);
|
||||||
} catch (IOException e) {
|
return false;
|
||||||
logger.atWarning().withCause(e).log("%s command not available.", cmd);
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
|
return true;
|
||||||
});
|
});
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns {@code true} if system command can be run from path.
|
* Returns {@code true} if system command can be run from the path.
|
||||||
*
|
*
|
||||||
* <p><b>Warning:</b> The command is actually run! So there could be side-effects. You might need
|
* <p><b>Warning:</b> The command is actually run! So there could be side effects. You might need
|
||||||
* to specify a version flag or something. Return code is ignored.
|
* to specify a version flag or something. Return code is ignored.
|
||||||
*
|
*
|
||||||
* <p>This result is a memoized. If multiple therads try to get the same result at once, the heavy
|
* <p>This result is a memoized. If multiple threads try to get the same result at once, the heavy
|
||||||
* lifting will only be performed by the first thread and the rest will wait.
|
* lifting will only be performed by the first thread and the rest will wait.
|
||||||
*/
|
*/
|
||||||
public static boolean hasCommand(String cmd) throws ExecutionException {
|
public static boolean hasCommand(String cmd) throws ExecutionException {
|
||||||
|
|
|
@ -58,6 +58,7 @@ PROPERTIES_HEADER = """\
|
||||||
# DO NOT EDIT THIS FILE BY HAND
|
# DO NOT EDIT THIS FILE BY HAND
|
||||||
org.gradle.jvmargs=-Xmx1024m
|
org.gradle.jvmargs=-Xmx1024m
|
||||||
org.gradle.caching=true
|
org.gradle.caching=true
|
||||||
|
org.gradle.parallel=true
|
||||||
"""
|
"""
|
||||||
|
|
||||||
# Help text to be displayed (in addition to the synopsis and flag help, which
|
# Help text to be displayed (in addition to the synopsis and flag help, which
|
||||||
|
|
|
@ -178,6 +178,12 @@ PRESUBMITS = {
|
||||||
{"/node_modules/"},
|
{"/node_modules/"},
|
||||||
):
|
):
|
||||||
"Do not use shaded dependencies from testcontainers.",
|
"Do not use shaded dependencies from testcontainers.",
|
||||||
|
PresubmitCheck(
|
||||||
|
r"com\.google\.common\.truth\.Truth8",
|
||||||
|
"java",
|
||||||
|
{"/node_modules/"},
|
||||||
|
):
|
||||||
|
"Truth8 is deprecated. Use Truth instead.",
|
||||||
}
|
}
|
||||||
|
|
||||||
# Note that this regex only works for one kind of Flyway file. If we want to
|
# Note that this regex only works for one kind of Flyway file. If we want to
|
||||||
|
|
|
@ -31,19 +31,6 @@ def goldensDir =
|
||||||
"${javaTestDir}/google/registry/webdriver/goldens/chrome-linux"
|
"${javaTestDir}/google/registry/webdriver/goldens/chrome-linux"
|
||||||
def jsDir = "${project.projectDir}/src/main/javascript"
|
def jsDir = "${project.projectDir}/src/main/javascript"
|
||||||
|
|
||||||
// Tests that conflict with (mostly unidentified) members of the main test
|
|
||||||
// suite. It is unclear if they are offenders (i.e., those that pollute global
|
|
||||||
// state) or victims.
|
|
||||||
// TODO(weiminyu): identify cause and fix offending tests.
|
|
||||||
def outcastTestPatterns = [
|
|
||||||
// Problem seems to lie with AppEngine TaskQueue for test.
|
|
||||||
"google/registry/batch/RefreshDnsOnHostRenameActionTest.*",
|
|
||||||
"google/registry/flows/EppLifecycleHostTest.*",
|
|
||||||
"google/registry/flows/domain/DomainCreateFlowTest.*",
|
|
||||||
"google/registry/flows/domain/DomainUpdateFlowTest.*",
|
|
||||||
"google/registry/tools/CreateDomainCommandTest.*",
|
|
||||||
]
|
|
||||||
|
|
||||||
// Tests that fail when running Gradle in a docker container, e. g. when
|
// Tests that fail when running Gradle in a docker container, e. g. when
|
||||||
// building the release artifacts in Google Cloud Build.
|
// building the release artifacts in Google Cloud Build.
|
||||||
def dockerIncompatibleTestPatterns = [
|
def dockerIncompatibleTestPatterns = [
|
||||||
|
@ -62,9 +49,9 @@ def dockerIncompatibleTestPatterns = [
|
||||||
"google/registry/persistence/PersistenceModuleTest.*",
|
"google/registry/persistence/PersistenceModuleTest.*",
|
||||||
]
|
]
|
||||||
|
|
||||||
// Tests that conflict with members of both the main test suite and the
|
// Tests that conflict with members of the main test suite. They seem to be
|
||||||
// outcast suite. They seem to be affected by global states outside of
|
// affected by global states outside of Nomulus classes, e.g., threads and
|
||||||
// Nomulus classes, e.g., threads and objects retained by frameworks.
|
// objects retained by frameworks.
|
||||||
// TODO(weiminyu): identify cause and fix offending tests.
|
// TODO(weiminyu): identify cause and fix offending tests.
|
||||||
def fragileTestPatterns = [
|
def fragileTestPatterns = [
|
||||||
// Changes cache timeouts and for some reason appears to have contention
|
// Changes cache timeouts and for some reason appears to have contention
|
||||||
|
@ -300,7 +287,6 @@ dependencies {
|
||||||
testImplementation deps['com.google.monitoring-client:contrib']
|
testImplementation deps['com.google.monitoring-client:contrib']
|
||||||
testImplementation deps['com.google.protobuf:protobuf-java-util']
|
testImplementation deps['com.google.protobuf:protobuf-java-util']
|
||||||
testImplementation deps['com.google.truth:truth']
|
testImplementation deps['com.google.truth:truth']
|
||||||
testImplementation deps['com.google.truth.extensions:truth-java8-extension']
|
|
||||||
testImplementation deps['org.checkerframework:checker-qual']
|
testImplementation deps['org.checkerframework:checker-qual']
|
||||||
testImplementation deps['org.hamcrest:hamcrest']
|
testImplementation deps['org.hamcrest:hamcrest']
|
||||||
testImplementation deps['org.hamcrest:hamcrest-core']
|
testImplementation deps['org.hamcrest:hamcrest-core']
|
||||||
|
@ -956,16 +942,6 @@ task fragileTest(type: FilteringTest) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
task outcastTest(type: FilteringTest) {
|
|
||||||
tests = outcastTestPatterns
|
|
||||||
|
|
||||||
// Sets the maximum number of test executors that may exist at the same time.
|
|
||||||
// Note that this number appears to contribute to NoClassDefFoundError
|
|
||||||
// exceptions on certain machines and distros. The root cause is unclear.
|
|
||||||
// Try reducing this number if you experience similar problems.
|
|
||||||
maxParallelForks 3
|
|
||||||
}
|
|
||||||
|
|
||||||
// Dedicated test suite for schema-dependent tests.
|
// Dedicated test suite for schema-dependent tests.
|
||||||
task sqlIntegrationTest(type: FilteringTest) {
|
task sqlIntegrationTest(type: FilteringTest) {
|
||||||
// TestSuite still requires a JUnit 4 runner, which knows how to handle JUnit 5 tests.
|
// TestSuite still requires a JUnit 4 runner, which knows how to handle JUnit 5 tests.
|
||||||
|
@ -989,7 +965,6 @@ task registryToolIntegrationTest(dependsOn: nomulus, type: FilteringTest) {
|
||||||
task standardTest(type: FilteringTest) {
|
task standardTest(type: FilteringTest) {
|
||||||
includeAllTests()
|
includeAllTests()
|
||||||
exclude fragileTestPatterns
|
exclude fragileTestPatterns
|
||||||
exclude outcastTestPatterns
|
|
||||||
// See SqlIntegrationTestSuite.java
|
// See SqlIntegrationTestSuite.java
|
||||||
exclude '**/*BeforeSuiteTest.*', '**/*AfterSuiteTest.*'
|
exclude '**/*BeforeSuiteTest.*', '**/*AfterSuiteTest.*'
|
||||||
|
|
||||||
|
@ -1006,7 +981,7 @@ task standardTest(type: FilteringTest) {
|
||||||
// Also, Gradle executes tests in 1 thread and some of our test infrastructures
|
// Also, Gradle executes tests in 1 thread and some of our test infrastructures
|
||||||
// depend on that, e.g. DualDatabaseTestInvocationContextProvider injects
|
// depend on that, e.g. DualDatabaseTestInvocationContextProvider injects
|
||||||
// different implementation of TransactionManager into TransactionManagerFactory.
|
// different implementation of TransactionManager into TransactionManagerFactory.
|
||||||
maxParallelForks 5
|
maxParallelForks 64
|
||||||
|
|
||||||
systemProperty 'test.projectRoot', rootProject.projectRootDir
|
systemProperty 'test.projectRoot', rootProject.projectRootDir
|
||||||
systemProperty 'test.resourcesDir', resourcesDir
|
systemProperty 'test.resourcesDir', resourcesDir
|
||||||
|
@ -1017,11 +992,11 @@ test {
|
||||||
// FilteringTest tasks.
|
// FilteringTest tasks.
|
||||||
exclude "**"
|
exclude "**"
|
||||||
// TODO(weiminyu): Remove dependency on sqlIntegrationTest
|
// TODO(weiminyu): Remove dependency on sqlIntegrationTest
|
||||||
}.dependsOn(fragileTest, outcastTest, standardTest, registryToolIntegrationTest, sqlIntegrationTest)
|
}.dependsOn(fragileTest, standardTest, registryToolIntegrationTest, sqlIntegrationTest)
|
||||||
|
|
||||||
|
|
||||||
// When we override tests, we also break the cleanTest command.
|
// When we override tests, we also break the cleanTest command.
|
||||||
cleanTest.dependsOn(cleanFragileTest, cleanOutcastTest, cleanStandardTest,
|
cleanTest.dependsOn(cleanFragileTest, cleanStandardTest,
|
||||||
cleanRegistryToolIntegrationTest, cleanSqlIntegrationTest)
|
cleanRegistryToolIntegrationTest, cleanSqlIntegrationTest)
|
||||||
|
|
||||||
project.build.dependsOn devtool
|
project.build.dependsOn devtool
|
||||||
|
|
|
@ -79,7 +79,7 @@ com.google.api:gax-grpc:2.39.0=compileClasspath,deploy_jar,nonprodCompileClasspa
|
||||||
com.google.api:gax-httpjson:2.39.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
|
com.google.api:gax-httpjson:2.39.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
|
||||||
com.google.api:gax:2.42.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
|
com.google.api:gax:2.42.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
|
||||||
com.google.apis:google-api-services-admin-directory:directory_v1-rev118-1.25.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
|
com.google.apis:google-api-services-admin-directory:directory_v1-rev118-1.25.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
|
||||||
com.google.apis:google-api-services-appengine:v1-rev20240218-2.0.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
|
com.google.apis:google-api-services-appengine:v1-rev20240226-2.0.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
|
||||||
com.google.apis:google-api-services-bigquery:v2-rev20230812-2.0.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
|
com.google.apis:google-api-services-bigquery:v2-rev20230812-2.0.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
|
||||||
com.google.apis:google-api-services-cloudresourcemanager:v1-rev20230806-2.0.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
|
com.google.apis:google-api-services-cloudresourcemanager:v1-rev20230806-2.0.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
|
||||||
com.google.apis:google-api-services-dataflow:v1b3-rev20240113-2.0.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
|
com.google.apis:google-api-services-dataflow:v1b3-rev20240113-2.0.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
|
||||||
|
@ -143,7 +143,8 @@ com.google.dagger:dagger:2.51=annotationProcessor,compileClasspath,deploy_jar,no
|
||||||
com.google.devtools.ksp:symbol-processing-api:1.9.20-1.0.14=annotationProcessor,testAnnotationProcessor
|
com.google.devtools.ksp:symbol-processing-api:1.9.20-1.0.14=annotationProcessor,testAnnotationProcessor
|
||||||
com.google.errorprone:error_prone_annotation:2.23.0=annotationProcessor,errorprone,nonprodAnnotationProcessor,testAnnotationProcessor
|
com.google.errorprone:error_prone_annotation:2.23.0=annotationProcessor,errorprone,nonprodAnnotationProcessor,testAnnotationProcessor
|
||||||
com.google.errorprone:error_prone_annotations:2.23.0=annotationProcessor,errorprone,nonprodAnnotationProcessor,testAnnotationProcessor
|
com.google.errorprone:error_prone_annotations:2.23.0=annotationProcessor,errorprone,nonprodAnnotationProcessor,testAnnotationProcessor
|
||||||
com.google.errorprone:error_prone_annotations:2.24.1=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
|
com.google.errorprone:error_prone_annotations:2.24.1=compileClasspath,nonprodCompileClasspath
|
||||||
|
com.google.errorprone:error_prone_annotations:2.25.0=deploy_jar,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
|
||||||
com.google.errorprone:error_prone_annotations:2.7.1=checkstyle,soy
|
com.google.errorprone:error_prone_annotations:2.7.1=checkstyle,soy
|
||||||
com.google.errorprone:error_prone_check_api:2.23.0=annotationProcessor,errorprone,nonprodAnnotationProcessor,testAnnotationProcessor
|
com.google.errorprone:error_prone_check_api:2.23.0=annotationProcessor,errorprone,nonprodAnnotationProcessor,testAnnotationProcessor
|
||||||
com.google.errorprone:error_prone_core:2.23.0=annotationProcessor,errorprone,nonprodAnnotationProcessor,testAnnotationProcessor
|
com.google.errorprone:error_prone_core:2.23.0=annotationProcessor,errorprone,nonprodAnnotationProcessor,testAnnotationProcessor
|
||||||
|
@ -198,8 +199,7 @@ com.google.protobuf:protobuf-java:3.25.2=compileClasspath,deploy_jar,nonprodComp
|
||||||
com.google.protobuf:protobuf-java:3.25.3=soy
|
com.google.protobuf:protobuf-java:3.25.3=soy
|
||||||
com.google.re2j:re2j:1.7=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
|
com.google.re2j:re2j:1.7=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
|
||||||
com.google.template:soy:2021-02-01=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,soy,testCompileClasspath,testRuntimeClasspath
|
com.google.template:soy:2021-02-01=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,soy,testCompileClasspath,testRuntimeClasspath
|
||||||
com.google.truth.extensions:truth-java8-extension:1.4.1=testCompileClasspath,testRuntimeClasspath
|
com.google.truth:truth:1.4.2=deploy_jar,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
|
||||||
com.google.truth:truth:1.4.1=deploy_jar,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
|
|
||||||
com.googlecode.json-simple:json-simple:1.1.1=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
|
com.googlecode.json-simple:json-simple:1.1.1=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
|
||||||
com.ibm.icu:icu4j:57.1=soy
|
com.ibm.icu:icu4j:57.1=soy
|
||||||
com.ibm.icu:icu4j:73.2=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
|
com.ibm.icu:icu4j:73.2=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
|
||||||
|
@ -325,9 +325,9 @@ jline:jline:1.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRunti
|
||||||
joda-time:joda-time:2.10.14=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
|
joda-time:joda-time:2.10.14=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
|
||||||
junit:junit:4.13.2=nonprodCompileClasspath,nonprodRuntimeClasspath,testCompileClasspath,testRuntimeClasspath
|
junit:junit:4.13.2=nonprodCompileClasspath,nonprodRuntimeClasspath,testCompileClasspath,testRuntimeClasspath
|
||||||
net.arnx:nashorn-promise:0.1.1=nonprodRuntime,runtime,testRuntimeClasspath
|
net.arnx:nashorn-promise:0.1.1=nonprodRuntime,runtime,testRuntimeClasspath
|
||||||
net.bytebuddy:byte-buddy-agent:1.14.11=testCompileClasspath,testRuntimeClasspath
|
net.bytebuddy:byte-buddy-agent:1.14.12=testCompileClasspath,testRuntimeClasspath
|
||||||
net.bytebuddy:byte-buddy:1.12.18=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath
|
net.bytebuddy:byte-buddy:1.12.18=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath
|
||||||
net.bytebuddy:byte-buddy:1.14.11=testCompileClasspath,testRuntimeClasspath
|
net.bytebuddy:byte-buddy:1.14.12=testCompileClasspath,testRuntimeClasspath
|
||||||
net.java.dev.javacc:javacc:4.1=css
|
net.java.dev.javacc:javacc:4.1=css
|
||||||
net.java.dev.jna:jna:5.13.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
|
net.java.dev.jna:jna:5.13.0=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
|
||||||
net.ltgt.gradle.incap:incap:0.2=annotationProcessor,testAnnotationProcessor
|
net.ltgt.gradle.incap:incap:0.2=annotationProcessor,testAnnotationProcessor
|
||||||
|
@ -456,8 +456,8 @@ org.junit.platform:junit-platform-suite-commons:1.10.2=testRuntimeClasspath
|
||||||
org.junit:junit-bom:5.10.2=testCompileClasspath,testRuntimeClasspath
|
org.junit:junit-bom:5.10.2=testCompileClasspath,testRuntimeClasspath
|
||||||
org.jvnet.staxex:stax-ex:1.8=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
|
org.jvnet.staxex:stax-ex:1.8=compileClasspath,deploy_jar,nonprodCompileClasspath,nonprodRuntimeClasspath,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
|
||||||
org.mockito:mockito-core:1.10.19=css
|
org.mockito:mockito-core:1.10.19=css
|
||||||
org.mockito:mockito-core:5.10.0=testCompileClasspath,testRuntimeClasspath
|
org.mockito:mockito-core:5.11.0=testCompileClasspath,testRuntimeClasspath
|
||||||
org.mockito:mockito-junit-jupiter:5.10.0=testCompileClasspath,testRuntimeClasspath
|
org.mockito:mockito-junit-jupiter:5.11.0=testCompileClasspath,testRuntimeClasspath
|
||||||
org.mortbay.jetty:jetty-util:6.1.26=testCompileClasspath,testRuntimeClasspath
|
org.mortbay.jetty:jetty-util:6.1.26=testCompileClasspath,testRuntimeClasspath
|
||||||
org.mortbay.jetty:jetty:6.1.26=testCompileClasspath,testRuntimeClasspath
|
org.mortbay.jetty:jetty:6.1.26=testCompileClasspath,testRuntimeClasspath
|
||||||
org.objenesis:objenesis:2.1=css
|
org.objenesis:objenesis:2.1=css
|
||||||
|
|
|
@ -16,7 +16,6 @@ package google.registry.batch;
|
||||||
|
|
||||||
import static com.google.common.truth.Truth.assertThat;
|
import static com.google.common.truth.Truth.assertThat;
|
||||||
import static com.google.common.truth.Truth.assertWithMessage;
|
import static com.google.common.truth.Truth.assertWithMessage;
|
||||||
import static com.google.common.truth.Truth8.assertThat;
|
|
||||||
import static google.registry.model.EppResourceUtils.loadByForeignKey;
|
import static google.registry.model.EppResourceUtils.loadByForeignKey;
|
||||||
import static google.registry.testing.DatabaseHelper.assertDomainDnsRequests;
|
import static google.registry.testing.DatabaseHelper.assertDomainDnsRequests;
|
||||||
import static google.registry.testing.DatabaseHelper.createTld;
|
import static google.registry.testing.DatabaseHelper.createTld;
|
||||||
|
|
|
@ -15,7 +15,6 @@
|
||||||
package google.registry.bsa;
|
package google.registry.bsa;
|
||||||
|
|
||||||
import static com.google.common.truth.Truth.assertThat;
|
import static com.google.common.truth.Truth.assertThat;
|
||||||
import static com.google.common.truth.Truth8.assertThat;
|
|
||||||
import static google.registry.bsa.BsaDiffCreator.ORDER_ID_SENTINEL;
|
import static google.registry.bsa.BsaDiffCreator.ORDER_ID_SENTINEL;
|
||||||
import static org.junit.Assert.assertThrows;
|
import static org.junit.Assert.assertThrows;
|
||||||
import static org.mockito.ArgumentMatchers.anyString;
|
import static org.mockito.ArgumentMatchers.anyString;
|
||||||
|
|
|
@ -16,7 +16,6 @@ package google.registry.bsa;
|
||||||
|
|
||||||
import static com.google.common.io.BaseEncoding.base16;
|
import static com.google.common.io.BaseEncoding.base16;
|
||||||
import static com.google.common.truth.Truth.assertThat;
|
import static com.google.common.truth.Truth.assertThat;
|
||||||
import static com.google.common.truth.Truth8.assertThat;
|
|
||||||
import static google.registry.bsa.persistence.BsaTestingUtils.createDownloadScheduler;
|
import static google.registry.bsa.persistence.BsaTestingUtils.createDownloadScheduler;
|
||||||
import static google.registry.persistence.transaction.TransactionManagerFactory.tm;
|
import static google.registry.persistence.transaction.TransactionManagerFactory.tm;
|
||||||
import static google.registry.testing.DatabaseHelper.createTlds;
|
import static google.registry.testing.DatabaseHelper.createTlds;
|
||||||
|
|
|
@ -15,7 +15,6 @@
|
||||||
package google.registry.bsa;
|
package google.registry.bsa;
|
||||||
|
|
||||||
import static com.google.common.truth.Truth.assertThat;
|
import static com.google.common.truth.Truth.assertThat;
|
||||||
import static com.google.common.truth.Truth8.assertThat;
|
|
||||||
import static google.registry.bsa.ReservedDomainsTestingUtils.addReservedDomainToList;
|
import static google.registry.bsa.ReservedDomainsTestingUtils.addReservedDomainToList;
|
||||||
import static google.registry.bsa.ReservedDomainsTestingUtils.addReservedListsToTld;
|
import static google.registry.bsa.ReservedDomainsTestingUtils.addReservedListsToTld;
|
||||||
import static google.registry.bsa.ReservedDomainsTestingUtils.createReservedList;
|
import static google.registry.bsa.ReservedDomainsTestingUtils.createReservedList;
|
||||||
|
|
|
@ -15,7 +15,6 @@
|
||||||
package google.registry.bsa;
|
package google.registry.bsa;
|
||||||
|
|
||||||
import static com.google.common.truth.Truth.assertThat;
|
import static com.google.common.truth.Truth.assertThat;
|
||||||
import static com.google.common.truth.Truth8.assertThat;
|
|
||||||
import static java.nio.charset.StandardCharsets.UTF_8;
|
import static java.nio.charset.StandardCharsets.UTF_8;
|
||||||
import static org.mockito.Mockito.when;
|
import static org.mockito.Mockito.when;
|
||||||
|
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
|
|
||||||
package google.registry.bsa.api;
|
package google.registry.bsa.api;
|
||||||
|
|
||||||
import static com.google.common.truth.Truth8.assertThat;
|
import static com.google.common.truth.Truth.assertThat;
|
||||||
import static google.registry.bsa.api.JsonSerializations.toCompletedOrdersReport;
|
import static google.registry.bsa.api.JsonSerializations.toCompletedOrdersReport;
|
||||||
import static google.registry.bsa.api.JsonSerializations.toInProgressOrdersReport;
|
import static google.registry.bsa.api.JsonSerializations.toInProgressOrdersReport;
|
||||||
import static google.registry.bsa.api.JsonSerializations.toUnblockableDomainsReport;
|
import static google.registry.bsa.api.JsonSerializations.toUnblockableDomainsReport;
|
||||||
|
|
|
@ -15,7 +15,6 @@
|
||||||
package google.registry.bsa.persistence;
|
package google.registry.bsa.persistence;
|
||||||
|
|
||||||
import static com.google.common.truth.Truth.assertThat;
|
import static com.google.common.truth.Truth.assertThat;
|
||||||
import static com.google.common.truth.Truth8.assertThat;
|
|
||||||
import static google.registry.persistence.transaction.TransactionManagerFactory.tm;
|
import static google.registry.persistence.transaction.TransactionManagerFactory.tm;
|
||||||
import static org.joda.time.DateTimeZone.UTC;
|
import static org.joda.time.DateTimeZone.UTC;
|
||||||
import static org.junit.jupiter.api.Assertions.assertThrows;
|
import static org.junit.jupiter.api.Assertions.assertThrows;
|
||||||
|
|
|
@ -15,7 +15,6 @@
|
||||||
package google.registry.bsa.persistence;
|
package google.registry.bsa.persistence;
|
||||||
|
|
||||||
import static com.google.common.truth.Truth.assertThat;
|
import static com.google.common.truth.Truth.assertThat;
|
||||||
import static com.google.common.truth.Truth8.assertThat;
|
|
||||||
import static google.registry.bsa.DownloadStage.CHECKSUMS_DO_NOT_MATCH;
|
import static google.registry.bsa.DownloadStage.CHECKSUMS_DO_NOT_MATCH;
|
||||||
import static google.registry.bsa.DownloadStage.DONE;
|
import static google.registry.bsa.DownloadStage.DONE;
|
||||||
import static google.registry.bsa.DownloadStage.DOWNLOAD_BLOCK_LISTS;
|
import static google.registry.bsa.DownloadStage.DOWNLOAD_BLOCK_LISTS;
|
||||||
|
|
|
@ -15,7 +15,6 @@
|
||||||
package google.registry.bsa.persistence;
|
package google.registry.bsa.persistence;
|
||||||
|
|
||||||
import static com.google.common.truth.Truth.assertThat;
|
import static com.google.common.truth.Truth.assertThat;
|
||||||
import static com.google.common.truth.Truth8.assertThat;
|
|
||||||
import static google.registry.bsa.ReservedDomainsTestingUtils.addReservedListsToTld;
|
import static google.registry.bsa.ReservedDomainsTestingUtils.addReservedListsToTld;
|
||||||
import static google.registry.bsa.ReservedDomainsTestingUtils.createReservedList;
|
import static google.registry.bsa.ReservedDomainsTestingUtils.createReservedList;
|
||||||
import static google.registry.bsa.persistence.LabelDiffUpdates.applyLabelDiff;
|
import static google.registry.bsa.persistence.LabelDiffUpdates.applyLabelDiff;
|
||||||
|
|
|
@ -15,7 +15,6 @@
|
||||||
package google.registry.bsa.persistence;
|
package google.registry.bsa.persistence;
|
||||||
|
|
||||||
import static com.google.common.truth.Truth.assertThat;
|
import static com.google.common.truth.Truth.assertThat;
|
||||||
import static com.google.common.truth.Truth8.assertThat;
|
|
||||||
import static google.registry.bsa.RefreshStage.APPLY_CHANGES;
|
import static google.registry.bsa.RefreshStage.APPLY_CHANGES;
|
||||||
import static google.registry.bsa.RefreshStage.DONE;
|
import static google.registry.bsa.RefreshStage.DONE;
|
||||||
import static google.registry.persistence.transaction.TransactionManagerFactory.tm;
|
import static google.registry.persistence.transaction.TransactionManagerFactory.tm;
|
||||||
|
|
|
@ -34,6 +34,7 @@ import java.util.Arrays;
|
||||||
import javax.net.SocketFactory;
|
import javax.net.SocketFactory;
|
||||||
import org.joda.time.Duration;
|
import org.joda.time.Duration;
|
||||||
import org.junit.jupiter.api.BeforeEach;
|
import org.junit.jupiter.api.BeforeEach;
|
||||||
|
import org.junit.jupiter.api.Disabled;
|
||||||
import org.junit.jupiter.api.Test;
|
import org.junit.jupiter.api.Test;
|
||||||
import org.xbill.DNS.ARecord;
|
import org.xbill.DNS.ARecord;
|
||||||
import org.xbill.DNS.DClass;
|
import org.xbill.DNS.DClass;
|
||||||
|
@ -111,6 +112,9 @@ class DnsMessageTransportTest {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
@Disabled("This test hangs and causes OOM when using Java 21")
|
||||||
|
// This test should never have passed. The socket is mocked and calling setSoTimeout() has no
|
||||||
|
// effect whatsoever. We should consider removing it.
|
||||||
void testTimeoutReceivingResponse() throws Exception {
|
void testTimeoutReceivingResponse() throws Exception {
|
||||||
InputStream mockInputStream = mock(InputStream.class);
|
InputStream mockInputStream = mock(InputStream.class);
|
||||||
when(mockInputStream.read()).thenThrow(new SocketTimeoutException("testing"));
|
when(mockInputStream.read()).thenThrow(new SocketTimeoutException("testing"));
|
||||||
|
@ -142,7 +146,7 @@ class DnsMessageTransportTest {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
void testResponseIdMismatchThrowsExeption() throws Exception {
|
void testResponseIdMismatchThrowsException() throws Exception {
|
||||||
expectedResponse.getHeader().setID(1 + simpleQuery.getHeader().getID());
|
expectedResponse.getHeader().setID(1 + simpleQuery.getHeader().getID());
|
||||||
when(mockSocket.getInputStream())
|
when(mockSocket.getInputStream())
|
||||||
.thenReturn(new ByteArrayInputStream(messageToBytesWithLength(expectedResponse)));
|
.thenReturn(new ByteArrayInputStream(messageToBytesWithLength(expectedResponse)));
|
||||||
|
|
|
@ -15,7 +15,6 @@
|
||||||
package google.registry.flows;
|
package google.registry.flows;
|
||||||
|
|
||||||
import static com.google.common.truth.Truth.assertThat;
|
import static com.google.common.truth.Truth.assertThat;
|
||||||
import static com.google.common.truth.Truth8.assertThat;
|
|
||||||
import static google.registry.model.tld.Tld.TldState.PREDELEGATION;
|
import static google.registry.model.tld.Tld.TldState.PREDELEGATION;
|
||||||
import static google.registry.monitoring.whitebox.CheckApiMetric.Availability.AVAILABLE;
|
import static google.registry.monitoring.whitebox.CheckApiMetric.Availability.AVAILABLE;
|
||||||
import static google.registry.monitoring.whitebox.CheckApiMetric.Availability.BSA_BLOCKED;
|
import static google.registry.monitoring.whitebox.CheckApiMetric.Availability.BSA_BLOCKED;
|
||||||
|
|
|
@ -15,7 +15,6 @@
|
||||||
package google.registry.flows;
|
package google.registry.flows;
|
||||||
|
|
||||||
import static com.google.common.truth.Truth.assertThat;
|
import static com.google.common.truth.Truth.assertThat;
|
||||||
import static com.google.common.truth.Truth8.assertThat;
|
|
||||||
import static google.registry.testing.DatabaseHelper.getOnlyHistoryEntryOfType;
|
import static google.registry.testing.DatabaseHelper.getOnlyHistoryEntryOfType;
|
||||||
import static google.registry.testing.DatabaseHelper.loadAllOf;
|
import static google.registry.testing.DatabaseHelper.loadAllOf;
|
||||||
import static google.registry.testing.DatabaseHelper.stripBillingEventId;
|
import static google.registry.testing.DatabaseHelper.stripBillingEventId;
|
||||||
|
|
|
@ -16,7 +16,6 @@ package google.registry.flows;
|
||||||
|
|
||||||
import static com.google.common.truth.Truth.assertThat;
|
import static com.google.common.truth.Truth.assertThat;
|
||||||
import static com.google.common.truth.Truth.assertWithMessage;
|
import static com.google.common.truth.Truth.assertWithMessage;
|
||||||
import static com.google.common.truth.Truth8.assertThat;
|
|
||||||
import static google.registry.persistence.transaction.TransactionManagerFactory.tm;
|
import static google.registry.persistence.transaction.TransactionManagerFactory.tm;
|
||||||
import static google.registry.testing.TestDataHelper.loadFile;
|
import static google.registry.testing.TestDataHelper.loadFile;
|
||||||
import static google.registry.testing.TestLogHandlerUtils.findFirstLogMessageByPrefix;
|
import static google.registry.testing.TestLogHandlerUtils.findFirstLogMessageByPrefix;
|
||||||
|
|
|
@ -15,7 +15,6 @@
|
||||||
package google.registry.flows;
|
package google.registry.flows;
|
||||||
|
|
||||||
import static com.google.common.truth.Truth.assertThat;
|
import static com.google.common.truth.Truth.assertThat;
|
||||||
import static com.google.common.truth.Truth8.assertThat;
|
|
||||||
import static google.registry.testing.CertificateSamples.SAMPLE_CERT;
|
import static google.registry.testing.CertificateSamples.SAMPLE_CERT;
|
||||||
import static google.registry.testing.CertificateSamples.SAMPLE_CERT_HASH;
|
import static google.registry.testing.CertificateSamples.SAMPLE_CERT_HASH;
|
||||||
import static google.registry.testing.DatabaseHelper.loadRegistrar;
|
import static google.registry.testing.DatabaseHelper.loadRegistrar;
|
||||||
|
|
|
@ -17,7 +17,6 @@ package google.registry.flows.domain;
|
||||||
import static com.google.common.collect.ImmutableList.toImmutableList;
|
import static com.google.common.collect.ImmutableList.toImmutableList;
|
||||||
import static com.google.common.io.BaseEncoding.base16;
|
import static com.google.common.io.BaseEncoding.base16;
|
||||||
import static com.google.common.truth.Truth.assertThat;
|
import static com.google.common.truth.Truth.assertThat;
|
||||||
import static com.google.common.truth.Truth8.assertThat;
|
|
||||||
import static google.registry.bsa.persistence.BsaTestingUtils.persistBsaLabel;
|
import static google.registry.bsa.persistence.BsaTestingUtils.persistBsaLabel;
|
||||||
import static google.registry.flows.FlowTestCase.UserPrivileges.SUPERUSER;
|
import static google.registry.flows.FlowTestCase.UserPrivileges.SUPERUSER;
|
||||||
import static google.registry.model.billing.BillingBase.Flag.ANCHOR_TENANT;
|
import static google.registry.model.billing.BillingBase.Flag.ANCHOR_TENANT;
|
||||||
|
|
|
@ -16,7 +16,6 @@ package google.registry.flows.domain;
|
||||||
|
|
||||||
import static com.google.common.collect.MoreCollectors.onlyElement;
|
import static com.google.common.collect.MoreCollectors.onlyElement;
|
||||||
import static com.google.common.truth.Truth.assertThat;
|
import static com.google.common.truth.Truth.assertThat;
|
||||||
import static com.google.common.truth.Truth8.assertThat;
|
|
||||||
import static google.registry.batch.AsyncTaskEnqueuer.PARAM_REQUESTED_TIME;
|
import static google.registry.batch.AsyncTaskEnqueuer.PARAM_REQUESTED_TIME;
|
||||||
import static google.registry.batch.AsyncTaskEnqueuer.PARAM_RESAVE_TIMES;
|
import static google.registry.batch.AsyncTaskEnqueuer.PARAM_RESAVE_TIMES;
|
||||||
import static google.registry.batch.AsyncTaskEnqueuer.PARAM_RESOURCE_KEY;
|
import static google.registry.batch.AsyncTaskEnqueuer.PARAM_RESOURCE_KEY;
|
||||||
|
|
|
@ -15,7 +15,6 @@
|
||||||
package google.registry.flows.domain;
|
package google.registry.flows.domain;
|
||||||
|
|
||||||
import static com.google.common.truth.Truth.assertThat;
|
import static com.google.common.truth.Truth.assertThat;
|
||||||
import static com.google.common.truth.Truth8.assertThat;
|
|
||||||
import static google.registry.flows.domain.DomainTransferFlowTestCase.persistWithPendingTransfer;
|
import static google.registry.flows.domain.DomainTransferFlowTestCase.persistWithPendingTransfer;
|
||||||
import static google.registry.model.billing.BillingBase.RenewalPriceBehavior.DEFAULT;
|
import static google.registry.model.billing.BillingBase.RenewalPriceBehavior.DEFAULT;
|
||||||
import static google.registry.model.billing.BillingBase.RenewalPriceBehavior.NONPREMIUM;
|
import static google.registry.model.billing.BillingBase.RenewalPriceBehavior.NONPREMIUM;
|
||||||
|
@ -52,7 +51,7 @@ import com.google.common.collect.ImmutableMap;
|
||||||
import com.google.common.collect.ImmutableSet;
|
import com.google.common.collect.ImmutableSet;
|
||||||
import com.google.common.collect.ImmutableSortedMap;
|
import com.google.common.collect.ImmutableSortedMap;
|
||||||
import com.google.common.collect.Iterables;
|
import com.google.common.collect.Iterables;
|
||||||
import com.google.common.truth.Truth8;
|
import com.google.common.truth.Truth;
|
||||||
import google.registry.flows.EppException;
|
import google.registry.flows.EppException;
|
||||||
import google.registry.flows.EppRequestSource;
|
import google.registry.flows.EppRequestSource;
|
||||||
import google.registry.flows.FlowUtils.NotLoggedInException;
|
import google.registry.flows.FlowUtils.NotLoggedInException;
|
||||||
|
@ -1345,7 +1344,7 @@ class DomainRenewFlowTest extends ResourceFlowTestCase<DomainRenewFlow, Domain>
|
||||||
// We still need to verify that the bulk token is removed as it's not being tested as a part of
|
// We still need to verify that the bulk token is removed as it's not being tested as a part of
|
||||||
// doSuccessfulTest
|
// doSuccessfulTest
|
||||||
Domain domain = reloadResourceByForeignKey();
|
Domain domain = reloadResourceByForeignKey();
|
||||||
Truth8.assertThat(domain.getCurrentBulkToken()).isEmpty();
|
Truth.assertThat(domain.getCurrentBulkToken()).isEmpty();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
|
|
@ -15,7 +15,6 @@
|
||||||
package google.registry.flows.domain;
|
package google.registry.flows.domain;
|
||||||
|
|
||||||
import static com.google.common.truth.Truth.assertThat;
|
import static com.google.common.truth.Truth.assertThat;
|
||||||
import static com.google.common.truth.Truth8.assertThat;
|
|
||||||
import static google.registry.testing.DatabaseHelper.assertBillingEvents;
|
import static google.registry.testing.DatabaseHelper.assertBillingEvents;
|
||||||
import static google.registry.testing.DatabaseHelper.assertDomainDnsRequests;
|
import static google.registry.testing.DatabaseHelper.assertDomainDnsRequests;
|
||||||
import static google.registry.testing.DatabaseHelper.assertPollMessages;
|
import static google.registry.testing.DatabaseHelper.assertPollMessages;
|
||||||
|
|
|
@ -16,7 +16,6 @@ package google.registry.flows.domain;
|
||||||
|
|
||||||
import static com.google.common.collect.MoreCollectors.onlyElement;
|
import static com.google.common.collect.MoreCollectors.onlyElement;
|
||||||
import static com.google.common.truth.Truth.assertThat;
|
import static com.google.common.truth.Truth.assertThat;
|
||||||
import static com.google.common.truth.Truth8.assertThat;
|
|
||||||
import static google.registry.model.domain.token.AllocationToken.TokenType.BULK_PRICING;
|
import static google.registry.model.domain.token.AllocationToken.TokenType.BULK_PRICING;
|
||||||
import static google.registry.model.domain.token.AllocationToken.TokenType.SINGLE_USE;
|
import static google.registry.model.domain.token.AllocationToken.TokenType.SINGLE_USE;
|
||||||
import static google.registry.model.domain.token.AllocationToken.TokenType.UNLIMITED_USE;
|
import static google.registry.model.domain.token.AllocationToken.TokenType.UNLIMITED_USE;
|
||||||
|
|
|
@ -17,7 +17,6 @@ package google.registry.flows.domain;
|
||||||
import static com.google.common.collect.ImmutableSet.toImmutableSet;
|
import static com.google.common.collect.ImmutableSet.toImmutableSet;
|
||||||
import static com.google.common.collect.MoreCollectors.onlyElement;
|
import static com.google.common.collect.MoreCollectors.onlyElement;
|
||||||
import static com.google.common.truth.Truth.assertThat;
|
import static com.google.common.truth.Truth.assertThat;
|
||||||
import static com.google.common.truth.Truth8.assertThat;
|
|
||||||
import static google.registry.batch.AsyncTaskEnqueuer.PARAM_REQUESTED_TIME;
|
import static google.registry.batch.AsyncTaskEnqueuer.PARAM_REQUESTED_TIME;
|
||||||
import static google.registry.batch.AsyncTaskEnqueuer.PARAM_RESOURCE_KEY;
|
import static google.registry.batch.AsyncTaskEnqueuer.PARAM_RESOURCE_KEY;
|
||||||
import static google.registry.batch.AsyncTaskEnqueuer.QUEUE_ASYNC_ACTIONS;
|
import static google.registry.batch.AsyncTaskEnqueuer.QUEUE_ASYNC_ACTIONS;
|
||||||
|
|
|
@ -15,7 +15,6 @@
|
||||||
package google.registry.model;
|
package google.registry.model;
|
||||||
|
|
||||||
import static com.google.common.truth.Truth.assertThat;
|
import static com.google.common.truth.Truth.assertThat;
|
||||||
import static com.google.common.truth.Truth8.assertThat;
|
|
||||||
import static google.registry.model.EppResourceUtils.loadByForeignKey;
|
import static google.registry.model.EppResourceUtils.loadByForeignKey;
|
||||||
import static google.registry.testing.DatabaseHelper.persistActiveContact;
|
import static google.registry.testing.DatabaseHelper.persistActiveContact;
|
||||||
import static google.registry.testing.DatabaseHelper.persistActiveHost;
|
import static google.registry.testing.DatabaseHelper.persistActiveHost;
|
||||||
|
|
|
@ -15,7 +15,6 @@
|
||||||
package google.registry.model;
|
package google.registry.model;
|
||||||
|
|
||||||
import static com.google.common.truth.Truth.assertThat;
|
import static com.google.common.truth.Truth.assertThat;
|
||||||
import static com.google.common.truth.Truth8.assertThat;
|
|
||||||
import static google.registry.model.tld.Tld.TldState.GENERAL_AVAILABILITY;
|
import static google.registry.model.tld.Tld.TldState.GENERAL_AVAILABILITY;
|
||||||
import static google.registry.model.tld.Tld.TldState.START_DATE_SUNRISE;
|
import static google.registry.model.tld.Tld.TldState.START_DATE_SUNRISE;
|
||||||
import static google.registry.persistence.transaction.JpaTransactionManagerExtension.makeRegistrar1;
|
import static google.registry.persistence.transaction.JpaTransactionManagerExtension.makeRegistrar1;
|
||||||
|
|
|
@ -15,7 +15,6 @@
|
||||||
package google.registry.model.billing;
|
package google.registry.model.billing;
|
||||||
|
|
||||||
import static com.google.common.truth.Truth.assertThat;
|
import static com.google.common.truth.Truth.assertThat;
|
||||||
import static com.google.common.truth.Truth8.assertThat;
|
|
||||||
import static google.registry.model.domain.token.AllocationToken.TokenType.UNLIMITED_USE;
|
import static google.registry.model.domain.token.AllocationToken.TokenType.UNLIMITED_USE;
|
||||||
import static google.registry.testing.DatabaseHelper.createTld;
|
import static google.registry.testing.DatabaseHelper.createTld;
|
||||||
import static google.registry.testing.DatabaseHelper.loadByEntity;
|
import static google.registry.testing.DatabaseHelper.loadByEntity;
|
||||||
|
|
|
@ -18,7 +18,7 @@ import static google.registry.model.ImmutableObjectSubject.assertAboutImmutableO
|
||||||
import static google.registry.persistence.transaction.TransactionManagerFactory.tm;
|
import static google.registry.persistence.transaction.TransactionManagerFactory.tm;
|
||||||
import static org.junit.jupiter.api.Assertions.assertThrows;
|
import static org.junit.jupiter.api.Assertions.assertThrows;
|
||||||
|
|
||||||
import com.google.common.truth.Truth8;
|
import com.google.common.truth.Truth;
|
||||||
import google.registry.model.EntityTestCase;
|
import google.registry.model.EntityTestCase;
|
||||||
import org.junit.jupiter.api.Test;
|
import org.junit.jupiter.api.Test;
|
||||||
|
|
||||||
|
@ -57,10 +57,10 @@ public class UserDaoTest extends EntityTestCase {
|
||||||
UserDao.saveUser(user);
|
UserDao.saveUser(user);
|
||||||
User fromDb = UserDao.loadUser("email@email.com").get();
|
User fromDb = UserDao.loadUser("email@email.com").get();
|
||||||
// nonexistent one should never exist
|
// nonexistent one should never exist
|
||||||
Truth8.assertThat(UserDao.loadUser("nonexistent@email.com")).isEmpty();
|
Truth.assertThat(UserDao.loadUser("nonexistent@email.com")).isEmpty();
|
||||||
// now try deleting the one that does exist
|
// now try deleting the one that does exist
|
||||||
tm().transact(() -> tm().delete(fromDb));
|
tm().transact(() -> tm().delete(fromDb));
|
||||||
Truth8.assertThat(UserDao.loadUser("email@email.com")).isEmpty();
|
Truth.assertThat(UserDao.loadUser("email@email.com")).isEmpty();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
|
|
@ -15,7 +15,6 @@
|
||||||
package google.registry.model.contact;
|
package google.registry.model.contact;
|
||||||
|
|
||||||
import static com.google.common.truth.Truth.assertThat;
|
import static com.google.common.truth.Truth.assertThat;
|
||||||
import static com.google.common.truth.Truth8.assertThat;
|
|
||||||
import static google.registry.model.EppResourceUtils.loadByForeignKey;
|
import static google.registry.model.EppResourceUtils.loadByForeignKey;
|
||||||
import static google.registry.model.ImmutableObjectSubject.assertAboutImmutableObjects;
|
import static google.registry.model.ImmutableObjectSubject.assertAboutImmutableObjects;
|
||||||
import static google.registry.testing.ContactSubject.assertAboutContacts;
|
import static google.registry.testing.ContactSubject.assertAboutContacts;
|
||||||
|
|
|
@ -17,7 +17,6 @@ package google.registry.model.domain;
|
||||||
import static com.google.common.collect.ImmutableSet.toImmutableSet;
|
import static com.google.common.collect.ImmutableSet.toImmutableSet;
|
||||||
import static com.google.common.collect.Iterables.getOnlyElement;
|
import static com.google.common.collect.Iterables.getOnlyElement;
|
||||||
import static com.google.common.truth.Truth.assertThat;
|
import static com.google.common.truth.Truth.assertThat;
|
||||||
import static com.google.common.truth.Truth8.assertThat;
|
|
||||||
import static google.registry.model.EppResourceUtils.loadByForeignKey;
|
import static google.registry.model.EppResourceUtils.loadByForeignKey;
|
||||||
import static google.registry.model.billing.BillingBase.RenewalPriceBehavior.SPECIFIED;
|
import static google.registry.model.billing.BillingBase.RenewalPriceBehavior.SPECIFIED;
|
||||||
import static google.registry.model.domain.token.AllocationToken.TokenType.BULK_PRICING;
|
import static google.registry.model.domain.token.AllocationToken.TokenType.BULK_PRICING;
|
||||||
|
|
|
@ -15,7 +15,6 @@
|
||||||
package google.registry.model.domain.token;
|
package google.registry.model.domain.token;
|
||||||
|
|
||||||
import static com.google.common.truth.Truth.assertThat;
|
import static com.google.common.truth.Truth.assertThat;
|
||||||
import static com.google.common.truth.Truth8.assertThat;
|
|
||||||
import static google.registry.model.domain.token.AllocationToken.TokenStatus.CANCELLED;
|
import static google.registry.model.domain.token.AllocationToken.TokenStatus.CANCELLED;
|
||||||
import static google.registry.model.domain.token.AllocationToken.TokenStatus.ENDED;
|
import static google.registry.model.domain.token.AllocationToken.TokenStatus.ENDED;
|
||||||
import static google.registry.model.domain.token.AllocationToken.TokenStatus.NOT_STARTED;
|
import static google.registry.model.domain.token.AllocationToken.TokenStatus.NOT_STARTED;
|
||||||
|
|
|
@ -15,7 +15,6 @@
|
||||||
package google.registry.model.eppinput;
|
package google.registry.model.eppinput;
|
||||||
|
|
||||||
import static com.google.common.truth.Truth.assertThat;
|
import static com.google.common.truth.Truth.assertThat;
|
||||||
import static com.google.common.truth.Truth8.assertThat;
|
|
||||||
import static google.registry.model.eppcommon.EppXmlTransformer.unmarshal;
|
import static google.registry.model.eppcommon.EppXmlTransformer.unmarshal;
|
||||||
import static google.registry.testing.TestDataHelper.loadBytes;
|
import static google.registry.testing.TestDataHelper.loadBytes;
|
||||||
import static org.junit.jupiter.api.Assertions.assertThrows;
|
import static org.junit.jupiter.api.Assertions.assertThrows;
|
||||||
|
|
|
@ -16,7 +16,6 @@ package google.registry.model.registrar;
|
||||||
|
|
||||||
import static com.google.common.base.Preconditions.checkState;
|
import static com.google.common.base.Preconditions.checkState;
|
||||||
import static com.google.common.truth.Truth.assertThat;
|
import static com.google.common.truth.Truth.assertThat;
|
||||||
import static com.google.common.truth.Truth8.assertThat;
|
|
||||||
import static google.registry.persistence.transaction.TransactionManagerFactory.tm;
|
import static google.registry.persistence.transaction.TransactionManagerFactory.tm;
|
||||||
import static google.registry.testing.CertificateSamples.SAMPLE_CERT;
|
import static google.registry.testing.CertificateSamples.SAMPLE_CERT;
|
||||||
import static google.registry.testing.CertificateSamples.SAMPLE_CERT2;
|
import static google.registry.testing.CertificateSamples.SAMPLE_CERT2;
|
||||||
|
|
|
@ -15,7 +15,6 @@
|
||||||
package google.registry.model.server;
|
package google.registry.model.server;
|
||||||
|
|
||||||
import static com.google.common.truth.Truth.assertThat;
|
import static com.google.common.truth.Truth.assertThat;
|
||||||
import static com.google.common.truth.Truth8.assertThat;
|
|
||||||
import static google.registry.model.server.Lock.LockState.FREE;
|
import static google.registry.model.server.Lock.LockState.FREE;
|
||||||
import static google.registry.model.server.Lock.LockState.IN_USE;
|
import static google.registry.model.server.Lock.LockState.IN_USE;
|
||||||
import static google.registry.model.server.Lock.LockState.TIMED_OUT;
|
import static google.registry.model.server.Lock.LockState.TIMED_OUT;
|
||||||
|
|
|
@ -16,7 +16,6 @@ package google.registry.model.tld;
|
||||||
|
|
||||||
import static com.google.common.collect.ImmutableSet.toImmutableSet;
|
import static com.google.common.collect.ImmutableSet.toImmutableSet;
|
||||||
import static com.google.common.truth.Truth.assertThat;
|
import static com.google.common.truth.Truth.assertThat;
|
||||||
import static com.google.common.truth.Truth8.assertThat;
|
|
||||||
import static google.registry.persistence.transaction.TransactionManagerFactory.tm;
|
import static google.registry.persistence.transaction.TransactionManagerFactory.tm;
|
||||||
import static google.registry.testing.SqlHelper.getMostRecentRegistryLockByRepoId;
|
import static google.registry.testing.SqlHelper.getMostRecentRegistryLockByRepoId;
|
||||||
import static google.registry.testing.SqlHelper.getMostRecentUnlockedRegistryLockByRepoId;
|
import static google.registry.testing.SqlHelper.getMostRecentUnlockedRegistryLockByRepoId;
|
||||||
|
|
|
@ -16,7 +16,6 @@ package google.registry.model.tld;
|
||||||
|
|
||||||
import static com.google.common.truth.Truth.assertThat;
|
import static com.google.common.truth.Truth.assertThat;
|
||||||
import static com.google.common.truth.Truth.assertWithMessage;
|
import static com.google.common.truth.Truth.assertWithMessage;
|
||||||
import static com.google.common.truth.Truth8.assertThat;
|
|
||||||
import static google.registry.model.EntityYamlUtils.createObjectMapper;
|
import static google.registry.model.EntityYamlUtils.createObjectMapper;
|
||||||
import static google.registry.model.ImmutableObjectSubject.assertAboutImmutableObjects;
|
import static google.registry.model.ImmutableObjectSubject.assertAboutImmutableObjects;
|
||||||
import static google.registry.model.domain.token.AllocationToken.TokenType.DEFAULT_PROMO;
|
import static google.registry.model.domain.token.AllocationToken.TokenType.DEFAULT_PROMO;
|
||||||
|
|
|
@ -15,7 +15,6 @@
|
||||||
package google.registry.model.tld;
|
package google.registry.model.tld;
|
||||||
|
|
||||||
import static com.google.common.truth.Truth.assertThat;
|
import static com.google.common.truth.Truth.assertThat;
|
||||||
import static com.google.common.truth.Truth8.assertThat;
|
|
||||||
import static google.registry.model.tld.Tlds.hasActiveBsaEnrollment;
|
import static google.registry.model.tld.Tlds.hasActiveBsaEnrollment;
|
||||||
import static google.registry.testing.DatabaseHelper.createTlds;
|
import static google.registry.testing.DatabaseHelper.createTlds;
|
||||||
import static google.registry.testing.DatabaseHelper.newTld;
|
import static google.registry.testing.DatabaseHelper.newTld;
|
||||||
|
|
|
@ -16,7 +16,6 @@ package google.registry.model.tld.label;
|
||||||
|
|
||||||
import static com.google.common.collect.ImmutableMap.toImmutableMap;
|
import static com.google.common.collect.ImmutableMap.toImmutableMap;
|
||||||
import static com.google.common.truth.Truth.assertThat;
|
import static com.google.common.truth.Truth.assertThat;
|
||||||
import static com.google.common.truth.Truth8.assertThat;
|
|
||||||
import static google.registry.persistence.transaction.TransactionManagerFactory.tm;
|
import static google.registry.persistence.transaction.TransactionManagerFactory.tm;
|
||||||
import static google.registry.testing.DatabaseHelper.newTld;
|
import static google.registry.testing.DatabaseHelper.newTld;
|
||||||
import static google.registry.testing.DatabaseHelper.persistResource;
|
import static google.registry.testing.DatabaseHelper.persistResource;
|
||||||
|
|
|
@ -16,7 +16,6 @@ package google.registry.model.tld.label;
|
||||||
|
|
||||||
import static com.google.common.truth.Truth.assertThat;
|
import static com.google.common.truth.Truth.assertThat;
|
||||||
import static com.google.common.truth.Truth.assertWithMessage;
|
import static com.google.common.truth.Truth.assertWithMessage;
|
||||||
import static com.google.common.truth.Truth8.assertThat;
|
|
||||||
import static google.registry.testing.DatabaseHelper.createTld;
|
import static google.registry.testing.DatabaseHelper.createTld;
|
||||||
import static google.registry.testing.DatabaseHelper.persistPremiumList;
|
import static google.registry.testing.DatabaseHelper.persistPremiumList;
|
||||||
import static google.registry.testing.DatabaseHelper.persistReservedList;
|
import static google.registry.testing.DatabaseHelper.persistReservedList;
|
||||||
|
|
|
@ -15,7 +15,6 @@
|
||||||
package google.registry.model.tmch;
|
package google.registry.model.tmch;
|
||||||
|
|
||||||
import static com.google.common.truth.Truth.assertThat;
|
import static com.google.common.truth.Truth.assertThat;
|
||||||
import static com.google.common.truth.Truth8.assertThat;
|
|
||||||
import static google.registry.persistence.transaction.TransactionManagerFactory.tm;
|
import static google.registry.persistence.transaction.TransactionManagerFactory.tm;
|
||||||
import static org.junit.jupiter.api.Assertions.assertThrows;
|
import static org.junit.jupiter.api.Assertions.assertThrows;
|
||||||
|
|
||||||
|
|
|
@ -15,7 +15,6 @@
|
||||||
package google.registry.model.tmch;
|
package google.registry.model.tmch;
|
||||||
|
|
||||||
import static com.google.common.truth.Truth.assertThat;
|
import static com.google.common.truth.Truth.assertThat;
|
||||||
import static com.google.common.truth.Truth8.assertThat;
|
|
||||||
|
|
||||||
import google.registry.model.EntityTestCase;
|
import google.registry.model.EntityTestCase;
|
||||||
import org.junit.jupiter.api.Test;
|
import org.junit.jupiter.api.Test;
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
|
|
||||||
package google.registry.monitoring.whitebox;
|
package google.registry.monitoring.whitebox;
|
||||||
|
|
||||||
import static com.google.common.truth.Truth8.assertThat;
|
import static com.google.common.truth.Truth.assertThat;
|
||||||
import static google.registry.testing.DatabaseHelper.createTld;
|
import static google.registry.testing.DatabaseHelper.createTld;
|
||||||
import static google.registry.testing.DatabaseHelper.createTlds;
|
import static google.registry.testing.DatabaseHelper.createTlds;
|
||||||
|
|
||||||
|
|
|
@ -15,7 +15,6 @@
|
||||||
package google.registry.persistence.transaction;
|
package google.registry.persistence.transaction;
|
||||||
|
|
||||||
import static com.google.common.truth.Truth.assertThat;
|
import static com.google.common.truth.Truth.assertThat;
|
||||||
import static com.google.common.truth.Truth8.assertThat;
|
|
||||||
import static google.registry.persistence.transaction.DatabaseException.getSqlError;
|
import static google.registry.persistence.transaction.DatabaseException.getSqlError;
|
||||||
import static google.registry.persistence.transaction.DatabaseException.getSqlExceptionDetails;
|
import static google.registry.persistence.transaction.DatabaseException.getSqlExceptionDetails;
|
||||||
import static google.registry.persistence.transaction.DatabaseException.throwIfSqlException;
|
import static google.registry.persistence.transaction.DatabaseException.throwIfSqlException;
|
||||||
|
|
|
@ -56,7 +56,6 @@ import java.util.Objects;
|
||||||
import java.util.Optional;
|
import java.util.Optional;
|
||||||
import java.util.Properties;
|
import java.util.Properties;
|
||||||
import java.util.TimeZone;
|
import java.util.TimeZone;
|
||||||
import java.util.stream.Collectors;
|
|
||||||
import java.util.stream.Stream;
|
import java.util.stream.Stream;
|
||||||
import javax.persistence.Entity;
|
import javax.persistence.Entity;
|
||||||
import javax.persistence.EntityManagerFactory;
|
import javax.persistence.EntityManagerFactory;
|
||||||
|
@ -89,7 +88,7 @@ public abstract class JpaTransactionManagerExtension
|
||||||
"google/registry/persistence/transaction/cleanup_database.sql";
|
"google/registry/persistence/transaction/cleanup_database.sql";
|
||||||
private static final String POSTGRES_DB_NAME = "postgres";
|
private static final String POSTGRES_DB_NAME = "postgres";
|
||||||
// The type of JDBC connections started by the tests. This string value
|
// The type of JDBC connections started by the tests. This string value
|
||||||
// is documented in PSQL's official user guide.
|
// is documented in PostgreSQL's official user guide.
|
||||||
private static final String CONNECTION_BACKEND_TYPE = "client backend";
|
private static final String CONNECTION_BACKEND_TYPE = "client backend";
|
||||||
private static final int ACTIVE_CONNECTIONS_CAP = 5;
|
private static final int ACTIVE_CONNECTIONS_CAP = 5;
|
||||||
|
|
||||||
|
@ -98,7 +97,7 @@ public abstract class JpaTransactionManagerExtension
|
||||||
private final ImmutableList<Class<?>> extraEntityClasses;
|
private final ImmutableList<Class<?>> extraEntityClasses;
|
||||||
private final ImmutableMap<String, String> userProperties;
|
private final ImmutableMap<String, String> userProperties;
|
||||||
|
|
||||||
private static final JdbcDatabaseContainer database = create();
|
private static final JdbcDatabaseContainer<?> database = create();
|
||||||
private static final HibernateSchemaExporter exporter =
|
private static final HibernateSchemaExporter exporter =
|
||||||
HibernateSchemaExporter.create(
|
HibernateSchemaExporter.create(
|
||||||
database.getJdbcUrl(), database.getUsername(), database.getPassword());
|
database.getJdbcUrl(), database.getUsername(), database.getPassword());
|
||||||
|
@ -117,7 +116,7 @@ public abstract class JpaTransactionManagerExtension
|
||||||
// to false.
|
// to false.
|
||||||
private boolean includeNomulusSchema = true;
|
private boolean includeNomulusSchema = true;
|
||||||
|
|
||||||
// Whether to pre-polulate some registrars for ease of testing.
|
// Whether to pre-populate some registrars for ease of testing.
|
||||||
private final boolean withCannedData;
|
private final boolean withCannedData;
|
||||||
|
|
||||||
private TimeZone originalDefaultTimeZone;
|
private TimeZone originalDefaultTimeZone;
|
||||||
|
@ -138,9 +137,9 @@ public abstract class JpaTransactionManagerExtension
|
||||||
this.withCannedData = withCannedData;
|
this.withCannedData = withCannedData;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static JdbcDatabaseContainer create() {
|
private static JdbcDatabaseContainer<?> create() {
|
||||||
PostgreSQLContainer container =
|
PostgreSQLContainer<?> container =
|
||||||
new PostgreSQLContainer(NomulusPostgreSql.getDockerTag())
|
new PostgreSQLContainer<>(NomulusPostgreSql.getDockerTag())
|
||||||
.withDatabaseName(POSTGRES_DB_NAME);
|
.withDatabaseName(POSTGRES_DB_NAME);
|
||||||
container.start();
|
container.start();
|
||||||
return container;
|
return container;
|
||||||
|
@ -152,7 +151,7 @@ public abstract class JpaTransactionManagerExtension
|
||||||
Stream.of(initScriptPath.orElse("")),
|
Stream.of(initScriptPath.orElse("")),
|
||||||
extraEntityClasses.stream().map(Class::getCanonicalName))
|
extraEntityClasses.stream().map(Class::getCanonicalName))
|
||||||
.sorted()
|
.sorted()
|
||||||
.collect(Collectors.toList())
|
.toList()
|
||||||
.hashCode();
|
.hashCode();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -182,9 +181,9 @@ public abstract class JpaTransactionManagerExtension
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the full set of properties for setting up JPA {@link EntityManagerFactory} to the test
|
* Returns the full set of properties for setting up JPA {@link EntityManagerFactory} to the test
|
||||||
* database. This allows creation of customized JPA by individual tests.
|
* database. This allows the creation of customized JPA by individual tests.
|
||||||
*
|
*
|
||||||
* <p>Test that create {@code EntityManagerFactory} instances are reponsible for tearing them
|
* <p>Test that create {@code EntityManagerFactory} instances are responsible for tearing them
|
||||||
* down.
|
* down.
|
||||||
*/
|
*/
|
||||||
public ImmutableMap<String, String> getJpaProperties() {
|
public ImmutableMap<String, String> getJpaProperties() {
|
||||||
|
@ -248,7 +247,7 @@ public abstract class JpaTransactionManagerExtension
|
||||||
TimeZone.setDefault(originalDefaultTimeZone);
|
TimeZone.setDefault(originalDefaultTimeZone);
|
||||||
}
|
}
|
||||||
|
|
||||||
public JdbcDatabaseContainer getDatabase() {
|
public JdbcDatabaseContainer<?> getDatabase() {
|
||||||
return database;
|
return database;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -274,11 +273,11 @@ public abstract class JpaTransactionManagerExtension
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Asserts that the number of connections to the test database is reasonable, i.e. less than 5.
|
* Asserts that the number of connections to the test database is reasonable, i.e., less than 5.
|
||||||
* Ideally, it should be 0 if the connection is closed by the test as we don't use a connection
|
* Ideally, it should be 0 if the connection is closed by the test as we don't use a connection
|
||||||
* pool. However, Hibernate may still maintain some connection by it self. In addition, the
|
* pool. However, Hibernate may still maintain some connection by itself. In addition, the
|
||||||
* metadata table we use to detect active connection may not remove the closed connection
|
* metadata table we use to detect active connection may not remove the closed connection
|
||||||
* immediately. So, we decide to relax the condition to check if the number of active connection
|
* immediately. So, we decide to relax the condition to check if the number of active connections
|
||||||
* is less than 5 to reduce flakiness.
|
* is less than 5 to reduce flakiness.
|
||||||
*/
|
*/
|
||||||
private void assertReasonableNumDbConnections() {
|
private void assertReasonableNumDbConnections() {
|
||||||
|
@ -359,7 +358,7 @@ public abstract class JpaTransactionManagerExtension
|
||||||
.build())
|
.build())
|
||||||
.setLocalizedAddress(
|
.setLocalizedAddress(
|
||||||
new RegistrarAddress.Builder()
|
new RegistrarAddress.Builder()
|
||||||
.setStreet(ImmutableList.of("123 Example B\u0151ulevard"))
|
.setStreet(ImmutableList.of("123 Example Bőulevard"))
|
||||||
.setCity("Williamsburg")
|
.setCity("Williamsburg")
|
||||||
.setState("NY")
|
.setState("NY")
|
||||||
.setZip("11211")
|
.setZip("11211")
|
||||||
|
|
|
@ -22,7 +22,7 @@ import static org.junit.jupiter.api.Assertions.assertThrows;
|
||||||
|
|
||||||
import com.google.common.collect.ImmutableList;
|
import com.google.common.collect.ImmutableList;
|
||||||
import com.google.common.collect.Maps;
|
import com.google.common.collect.Maps;
|
||||||
import com.google.common.truth.Truth8;
|
import com.google.common.truth.Truth;
|
||||||
import google.registry.model.ImmutableObject;
|
import google.registry.model.ImmutableObject;
|
||||||
import google.registry.persistence.VKey;
|
import google.registry.persistence.VKey;
|
||||||
import google.registry.persistence.transaction.JpaTestExtensions.JpaUnitTestExtension;
|
import google.registry.persistence.transaction.JpaTestExtensions.JpaUnitTestExtension;
|
||||||
|
@ -328,11 +328,10 @@ public class TransactionManagerTest {
|
||||||
@Test
|
@Test
|
||||||
void loadSingleton_returnsValue_orEmpty() {
|
void loadSingleton_returnsValue_orEmpty() {
|
||||||
assertEntityNotExist(theEntity);
|
assertEntityNotExist(theEntity);
|
||||||
Truth8.assertThat(tm().transact(() -> tm().loadSingleton(TestEntity.class))).isEmpty();
|
Truth.assertThat(tm().transact(() -> tm().loadSingleton(TestEntity.class))).isEmpty();
|
||||||
|
|
||||||
tm().transact(() -> tm().insert(theEntity));
|
tm().transact(() -> tm().insert(theEntity));
|
||||||
Truth8.assertThat(tm().transact(() -> tm().loadSingleton(TestEntity.class)))
|
Truth.assertThat(tm().transact(() -> tm().loadSingleton(TestEntity.class))).hasValue(theEntity);
|
||||||
.hasValue(theEntity);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
|
|
@ -381,8 +381,8 @@ class RdapDomainSearchActionTest extends RdapSearchActionTestCase<RdapDomainSear
|
||||||
|
|
||||||
private JsonObject generateExpectedJsonForTwoDomainsCatStarReplySql() {
|
private JsonObject generateExpectedJsonForTwoDomainsCatStarReplySql() {
|
||||||
return jsonFileBuilder()
|
return jsonFileBuilder()
|
||||||
.addDomain("cat2.lol", "17-LOL")
|
|
||||||
.addDomain("cat.lol", "C-LOL")
|
.addDomain("cat.lol", "C-LOL")
|
||||||
|
.addDomain("cat2.lol", "17-LOL")
|
||||||
.load("rdap_domains_two.json");
|
.load("rdap_domains_two.json");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -938,11 +938,11 @@ class RdapDomainSearchActionTest extends RdapSearchActionTestCase<RdapDomainSear
|
||||||
.isEqualTo(
|
.isEqualTo(
|
||||||
jsonFileBuilder()
|
jsonFileBuilder()
|
||||||
.addDomain("cat.1.test", "39-1_TEST")
|
.addDomain("cat.1.test", "39-1_TEST")
|
||||||
.addDomain("cat2.lol", "17-LOL")
|
|
||||||
.addDomain("cat.example", "21-EXAMPLE")
|
.addDomain("cat.example", "21-EXAMPLE")
|
||||||
.addDomain("cat.lol", "C-LOL")
|
.addDomain("cat.lol", "C-LOL")
|
||||||
.setNextQuery("name=cat*&cursor=Y2F0LmxvbA%3D%3D")
|
.addDomain("cat.みんな", "2D-Q9JYB4C")
|
||||||
.load("rdap_domains_four_truncated.json"));
|
.setNextQuery("name=cat*&cursor=Y2F0LnhuLS1xOWp5YjRj")
|
||||||
|
.load("rdap_domains_four_with_one_unicode_truncated.json"));
|
||||||
assertThat(response.getStatus()).isEqualTo(200);
|
assertThat(response.getStatus()).isEqualTo(200);
|
||||||
verifyMetrics(SearchType.BY_DOMAIN_NAME, Optional.of(5L), IncompletenessWarningType.TRUNCATED);
|
verifyMetrics(SearchType.BY_DOMAIN_NAME, Optional.of(5L), IncompletenessWarningType.TRUNCATED);
|
||||||
}
|
}
|
||||||
|
@ -1109,8 +1109,8 @@ class RdapDomainSearchActionTest extends RdapSearchActionTestCase<RdapDomainSear
|
||||||
assertThat(generateActualJson(RequestType.NAME, "*.lol"))
|
assertThat(generateActualJson(RequestType.NAME, "*.lol"))
|
||||||
.isEqualTo(
|
.isEqualTo(
|
||||||
jsonFileBuilder()
|
jsonFileBuilder()
|
||||||
.addDomain("cat2.lol", "17-LOL")
|
|
||||||
.addDomain("cat.lol", "C-LOL")
|
.addDomain("cat.lol", "C-LOL")
|
||||||
|
.addDomain("cat2.lol", "17-LOL")
|
||||||
.addDomain("domain1.lol", "4B-LOL")
|
.addDomain("domain1.lol", "4B-LOL")
|
||||||
.addDomain("domain2.lol", "4A-LOL")
|
.addDomain("domain2.lol", "4A-LOL")
|
||||||
.setNextQuery("name=*.lol&cursor=ZG9tYWluMi5sb2w%3D")
|
.setNextQuery("name=*.lol&cursor=ZG9tYWluMi5sb2w%3D")
|
||||||
|
@ -1159,9 +1159,9 @@ class RdapDomainSearchActionTest extends RdapSearchActionTestCase<RdapDomainSear
|
||||||
RequestType.NAME,
|
RequestType.NAME,
|
||||||
"domain*.lol",
|
"domain*.lol",
|
||||||
ImmutableList.of(
|
ImmutableList.of(
|
||||||
|
"domain1.lol",
|
||||||
"domain10.lol",
|
"domain10.lol",
|
||||||
"domain11.lol",
|
"domain11.lol",
|
||||||
"domain1.lol",
|
|
||||||
"domain2.lol",
|
"domain2.lol",
|
||||||
"domain3.lol",
|
"domain3.lol",
|
||||||
"domain4.lol",
|
"domain4.lol",
|
||||||
|
@ -1179,11 +1179,11 @@ class RdapDomainSearchActionTest extends RdapSearchActionTestCase<RdapDomainSear
|
||||||
RequestType.NAME,
|
RequestType.NAME,
|
||||||
"*.lol",
|
"*.lol",
|
||||||
ImmutableList.of(
|
ImmutableList.of(
|
||||||
"cat2.lol",
|
|
||||||
"cat.lol",
|
"cat.lol",
|
||||||
|
"cat2.lol",
|
||||||
|
"domain1.lol",
|
||||||
"domain10.lol",
|
"domain10.lol",
|
||||||
"domain11.lol",
|
"domain11.lol",
|
||||||
"domain1.lol",
|
|
||||||
"domain2.lol",
|
"domain2.lol",
|
||||||
"domain3.lol",
|
"domain3.lol",
|
||||||
"domain4.lol",
|
"domain4.lol",
|
||||||
|
|
|
@ -702,10 +702,10 @@ class RdapNameserverSearchActionTest extends RdapSearchActionTestCase<RdapNamese
|
||||||
"ns*",
|
"ns*",
|
||||||
ImmutableList.of(
|
ImmutableList.of(
|
||||||
"ns1.cat.1.test",
|
"ns1.cat.1.test",
|
||||||
"ns1.cat2.lol",
|
|
||||||
"ns1.cat.external",
|
"ns1.cat.external",
|
||||||
"ns1.cat.lol",
|
"ns1.cat.lol",
|
||||||
"ns1.cat.xn--q9jyb4c",
|
"ns1.cat.xn--q9jyb4c",
|
||||||
|
"ns1.cat2.lol",
|
||||||
"ns2.cat.lol",
|
"ns2.cat.lol",
|
||||||
"nsx1.cat.lol",
|
"nsx1.cat.lol",
|
||||||
"nsx2.cat.lol",
|
"nsx2.cat.lol",
|
||||||
|
|
|
@ -15,7 +15,6 @@
|
||||||
package google.registry.rde;
|
package google.registry.rde;
|
||||||
|
|
||||||
import static com.google.common.truth.Truth.assertThat;
|
import static com.google.common.truth.Truth.assertThat;
|
||||||
import static com.google.common.truth.Truth8.assertThat;
|
|
||||||
import static google.registry.testing.DatabaseHelper.createTld;
|
import static google.registry.testing.DatabaseHelper.createTld;
|
||||||
import static java.nio.charset.StandardCharsets.UTF_8;
|
import static java.nio.charset.StandardCharsets.UTF_8;
|
||||||
|
|
||||||
|
|
|
@ -17,7 +17,6 @@ package google.registry.rde;
|
||||||
import static com.google.common.io.BaseEncoding.base16;
|
import static com.google.common.io.BaseEncoding.base16;
|
||||||
import static com.google.common.truth.Truth.assertThat;
|
import static com.google.common.truth.Truth.assertThat;
|
||||||
import static com.google.common.truth.Truth.assertWithMessage;
|
import static com.google.common.truth.Truth.assertWithMessage;
|
||||||
import static com.google.common.truth.Truth8.assertThat;
|
|
||||||
import static google.registry.testing.DatabaseHelper.createTld;
|
import static google.registry.testing.DatabaseHelper.createTld;
|
||||||
import static google.registry.testing.DatabaseHelper.persistEppResource;
|
import static google.registry.testing.DatabaseHelper.persistEppResource;
|
||||||
import static google.registry.testing.DatabaseHelper.persistResource;
|
import static google.registry.testing.DatabaseHelper.persistResource;
|
||||||
|
|
|
@ -28,7 +28,7 @@ import static org.joda.time.DateTimeConstants.TUESDAY;
|
||||||
import static org.joda.time.Duration.standardDays;
|
import static org.joda.time.Duration.standardDays;
|
||||||
|
|
||||||
import com.google.common.collect.ImmutableSetMultimap;
|
import com.google.common.collect.ImmutableSetMultimap;
|
||||||
import com.google.common.truth.Truth8;
|
import com.google.common.truth.Truth;
|
||||||
import google.registry.model.common.Cursor;
|
import google.registry.model.common.Cursor;
|
||||||
import google.registry.model.common.Cursor.CursorType;
|
import google.registry.model.common.Cursor.CursorType;
|
||||||
import google.registry.model.tld.Tld;
|
import google.registry.model.tld.Tld;
|
||||||
|
@ -95,7 +95,7 @@ public class PendingDepositCheckerTest {
|
||||||
createTldWithEscrowEnabled("lol");
|
createTldWithEscrowEnabled("lol");
|
||||||
clock.advanceOneMilli();
|
clock.advanceOneMilli();
|
||||||
Tld registry = Tld.get("lol");
|
Tld registry = Tld.get("lol");
|
||||||
Truth8.assertThat(loadByKeyIfPresent(Cursor.createScopedVKey(RDE_STAGING, registry))).isEmpty();
|
Truth.assertThat(loadByKeyIfPresent(Cursor.createScopedVKey(RDE_STAGING, registry))).isEmpty();
|
||||||
checker.getTldsAndWatermarksPendingDepositForRdeAndBrda();
|
checker.getTldsAndWatermarksPendingDepositForRdeAndBrda();
|
||||||
assertThat(loadByKey(Cursor.createScopedVKey(RDE_STAGING, registry)).getCursorTime())
|
assertThat(loadByKey(Cursor.createScopedVKey(RDE_STAGING, registry)).getCursorTime())
|
||||||
.isEqualTo(DateTime.parse("2000-01-01TZ"));
|
.isEqualTo(DateTime.parse("2000-01-01TZ"));
|
||||||
|
@ -122,9 +122,9 @@ public class PendingDepositCheckerTest {
|
||||||
clock.advanceOneMilli();
|
clock.advanceOneMilli();
|
||||||
setCursor(registry, RDE_STAGING, DateTime.parse("2000-01-02TZ")); // assume rde is already done
|
setCursor(registry, RDE_STAGING, DateTime.parse("2000-01-02TZ")); // assume rde is already done
|
||||||
clock.advanceOneMilli();
|
clock.advanceOneMilli();
|
||||||
Truth8.assertThat(loadByKeyIfPresent(Cursor.createScopedVKey(BRDA, registry))).isEmpty();
|
Truth.assertThat(loadByKeyIfPresent(Cursor.createScopedVKey(BRDA, registry))).isEmpty();
|
||||||
assertThat(checker.getTldsAndWatermarksPendingDepositForRdeAndBrda()).isEmpty();
|
assertThat(checker.getTldsAndWatermarksPendingDepositForRdeAndBrda()).isEmpty();
|
||||||
Truth8.assertThat(loadByKeyIfPresent(Cursor.createScopedVKey(BRDA, registry))).isEmpty();
|
Truth.assertThat(loadByKeyIfPresent(Cursor.createScopedVKey(BRDA, registry))).isEmpty();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
|
|
@ -19,7 +19,7 @@ import static org.junit.jupiter.api.Assertions.assertThrows;
|
||||||
import static org.mockito.Mockito.mock;
|
import static org.mockito.Mockito.mock;
|
||||||
import static org.mockito.Mockito.when;
|
import static org.mockito.Mockito.when;
|
||||||
|
|
||||||
import com.google.common.truth.Truth8;
|
import com.google.common.truth.Truth;
|
||||||
import google.registry.request.HttpException.BadRequestException;
|
import google.registry.request.HttpException.BadRequestException;
|
||||||
import google.registry.testing.FakeClock;
|
import google.registry.testing.FakeClock;
|
||||||
import google.registry.util.Clock;
|
import google.registry.util.Clock;
|
||||||
|
@ -45,13 +45,13 @@ class ReportingModuleTest {
|
||||||
@Test
|
@Test
|
||||||
void testEmptyYearMonthParameter_returnsEmptyYearMonthOptional() {
|
void testEmptyYearMonthParameter_returnsEmptyYearMonthOptional() {
|
||||||
when(req.getParameter("yearMonth")).thenReturn("");
|
when(req.getParameter("yearMonth")).thenReturn("");
|
||||||
Truth8.assertThat(ReportingModule.provideYearMonthOptional(req)).isEmpty();
|
Truth.assertThat(ReportingModule.provideYearMonthOptional(req)).isEmpty();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
void testValidYearMonthParameter_returnsThatMonth() {
|
void testValidYearMonthParameter_returnsThatMonth() {
|
||||||
when(req.getParameter("yearMonth")).thenReturn("2017-05");
|
when(req.getParameter("yearMonth")).thenReturn("2017-05");
|
||||||
Truth8.assertThat(ReportingModule.provideYearMonthOptional(req))
|
Truth.assertThat(ReportingModule.provideYearMonthOptional(req))
|
||||||
.hasValue(new YearMonth(2017, 5));
|
.hasValue(new YearMonth(2017, 5));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -83,14 +83,13 @@ class ReportingModuleTest {
|
||||||
@Test
|
@Test
|
||||||
void testEmptyDateParameter_returnsEmptyDateOptional() {
|
void testEmptyDateParameter_returnsEmptyDateOptional() {
|
||||||
when(req.getParameter("date")).thenReturn("");
|
when(req.getParameter("date")).thenReturn("");
|
||||||
Truth8.assertThat(ReportingModule.provideDateOptional(req)).isEmpty();
|
Truth.assertThat(ReportingModule.provideDateOptional(req)).isEmpty();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
void testValidDateParameter_returnsThatDate() {
|
void testValidDateParameter_returnsThatDate() {
|
||||||
when(req.getParameter("date")).thenReturn("2017-05-13");
|
when(req.getParameter("date")).thenReturn("2017-05-13");
|
||||||
Truth8.assertThat(ReportingModule.provideDateOptional(req))
|
Truth.assertThat(ReportingModule.provideDateOptional(req)).hasValue(new LocalDate(2017, 5, 13));
|
||||||
.hasValue(new LocalDate(2017, 5, 13));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
|
|
@ -15,7 +15,6 @@
|
||||||
package google.registry.reporting.billing;
|
package google.registry.reporting.billing;
|
||||||
|
|
||||||
import static com.google.common.truth.Truth.assertThat;
|
import static com.google.common.truth.Truth.assertThat;
|
||||||
import static com.google.common.truth.Truth8.assertThat;
|
|
||||||
import static org.junit.jupiter.api.Assertions.assertThrows;
|
import static org.junit.jupiter.api.Assertions.assertThrows;
|
||||||
import static org.mockito.Mockito.doThrow;
|
import static org.mockito.Mockito.doThrow;
|
||||||
import static org.mockito.Mockito.mock;
|
import static org.mockito.Mockito.mock;
|
||||||
|
|
|
@ -15,7 +15,6 @@
|
||||||
package google.registry.reporting.spec11;
|
package google.registry.reporting.spec11;
|
||||||
|
|
||||||
import static com.google.common.truth.Truth.assertThat;
|
import static com.google.common.truth.Truth.assertThat;
|
||||||
import static com.google.common.truth.Truth8.assertThat;
|
|
||||||
import static org.mockito.Mockito.mock;
|
import static org.mockito.Mockito.mock;
|
||||||
import static org.mockito.Mockito.when;
|
import static org.mockito.Mockito.when;
|
||||||
|
|
||||||
|
|
|
@ -15,7 +15,6 @@
|
||||||
package google.registry.request;
|
package google.registry.request;
|
||||||
|
|
||||||
import static com.google.common.truth.Truth.assertThat;
|
import static com.google.common.truth.Truth.assertThat;
|
||||||
import static com.google.common.truth.Truth8.assertThat;
|
|
||||||
import static google.registry.request.Action.Method.GET;
|
import static google.registry.request.Action.Method.GET;
|
||||||
import static google.registry.request.Action.Method.POST;
|
import static google.registry.request.Action.Method.POST;
|
||||||
import static google.registry.request.auth.Auth.AUTH_API_ADMIN;
|
import static google.registry.request.auth.Auth.AUTH_API_ADMIN;
|
||||||
|
|
|
@ -15,7 +15,6 @@
|
||||||
package google.registry.request;
|
package google.registry.request;
|
||||||
|
|
||||||
import static com.google.common.truth.Truth.assertThat;
|
import static com.google.common.truth.Truth.assertThat;
|
||||||
import static com.google.common.truth.Truth8.assertThat;
|
|
||||||
import static google.registry.request.RequestParameters.extractBooleanParameter;
|
import static google.registry.request.RequestParameters.extractBooleanParameter;
|
||||||
import static google.registry.request.RequestParameters.extractEnumParameter;
|
import static google.registry.request.RequestParameters.extractEnumParameter;
|
||||||
import static google.registry.request.RequestParameters.extractOptionalDatetimeParameter;
|
import static google.registry.request.RequestParameters.extractOptionalDatetimeParameter;
|
||||||
|
|
|
@ -15,7 +15,6 @@
|
||||||
package google.registry.request;
|
package google.registry.request;
|
||||||
|
|
||||||
import static com.google.common.truth.Truth.assertThat;
|
import static com.google.common.truth.Truth.assertThat;
|
||||||
import static com.google.common.truth.Truth8.assertThat;
|
|
||||||
import static google.registry.request.auth.Auth.AUTH_API_ADMIN;
|
import static google.registry.request.auth.Auth.AUTH_API_ADMIN;
|
||||||
import static org.junit.jupiter.api.Assertions.assertThrows;
|
import static org.junit.jupiter.api.Assertions.assertThrows;
|
||||||
|
|
||||||
|
|
|
@ -15,7 +15,6 @@
|
||||||
package google.registry.request.auth;
|
package google.registry.request.auth;
|
||||||
|
|
||||||
import static com.google.common.truth.Truth.assertThat;
|
import static com.google.common.truth.Truth.assertThat;
|
||||||
import static com.google.common.truth.Truth8.assertThat;
|
|
||||||
import static google.registry.request.auth.AuthResult.NOT_AUTHENTICATED;
|
import static google.registry.request.auth.AuthResult.NOT_AUTHENTICATED;
|
||||||
import static google.registry.request.auth.AuthSettings.AuthLevel.APP;
|
import static google.registry.request.auth.AuthSettings.AuthLevel.APP;
|
||||||
import static google.registry.request.auth.AuthSettings.AuthLevel.NONE;
|
import static google.registry.request.auth.AuthSettings.AuthLevel.NONE;
|
||||||
|
|
|
@ -15,7 +15,6 @@
|
||||||
package google.registry.tldconfig.idn;
|
package google.registry.tldconfig.idn;
|
||||||
|
|
||||||
import static com.google.common.truth.Truth.assertThat;
|
import static com.google.common.truth.Truth.assertThat;
|
||||||
import static com.google.common.truth.Truth8.assertThat;
|
|
||||||
import static google.registry.persistence.transaction.TransactionManagerFactory.tm;
|
import static google.registry.persistence.transaction.TransactionManagerFactory.tm;
|
||||||
import static google.registry.testing.DatabaseHelper.createTld;
|
import static google.registry.testing.DatabaseHelper.createTld;
|
||||||
import static google.registry.testing.DatabaseHelper.persistResource;
|
import static google.registry.testing.DatabaseHelper.persistResource;
|
||||||
|
|
|
@ -16,7 +16,6 @@ package google.registry.tmch;
|
||||||
|
|
||||||
import static com.google.common.collect.ImmutableList.toImmutableList;
|
import static com.google.common.collect.ImmutableList.toImmutableList;
|
||||||
import static com.google.common.truth.Truth.assertThat;
|
import static com.google.common.truth.Truth.assertThat;
|
||||||
import static com.google.common.truth.Truth8.assertThat;
|
|
||||||
import static google.registry.persistence.transaction.TransactionManagerFactory.tm;
|
import static google.registry.persistence.transaction.TransactionManagerFactory.tm;
|
||||||
import static org.mockito.Mockito.times;
|
import static org.mockito.Mockito.times;
|
||||||
import static org.mockito.Mockito.verify;
|
import static org.mockito.Mockito.verify;
|
||||||
|
|
|
@ -14,7 +14,6 @@
|
||||||
package google.registry.tools;
|
package google.registry.tools;
|
||||||
|
|
||||||
import static com.google.common.truth.Truth.assertThat;
|
import static com.google.common.truth.Truth.assertThat;
|
||||||
import static com.google.common.truth.Truth8.assertThat;
|
|
||||||
import static google.registry.model.EntityYamlUtils.createObjectMapper;
|
import static google.registry.model.EntityYamlUtils.createObjectMapper;
|
||||||
import static google.registry.model.domain.token.AllocationToken.TokenType.DEFAULT_PROMO;
|
import static google.registry.model.domain.token.AllocationToken.TokenType.DEFAULT_PROMO;
|
||||||
import static google.registry.testing.DatabaseHelper.createTld;
|
import static google.registry.testing.DatabaseHelper.createTld;
|
||||||
|
|
|
@ -15,7 +15,6 @@
|
||||||
package google.registry.tools;
|
package google.registry.tools;
|
||||||
|
|
||||||
import static com.google.common.truth.Truth.assertThat;
|
import static com.google.common.truth.Truth.assertThat;
|
||||||
import static com.google.common.truth.Truth8.assertThat;
|
|
||||||
import static google.registry.persistence.transaction.TransactionManagerFactory.tm;
|
import static google.registry.persistence.transaction.TransactionManagerFactory.tm;
|
||||||
import static google.registry.testing.DatabaseHelper.persistResource;
|
import static google.registry.testing.DatabaseHelper.persistResource;
|
||||||
import static google.registry.util.DateTimeUtils.END_OF_TIME;
|
import static google.registry.util.DateTimeUtils.END_OF_TIME;
|
||||||
|
|
|
@ -15,7 +15,6 @@
|
||||||
package google.registry.tools;
|
package google.registry.tools;
|
||||||
|
|
||||||
import static com.google.common.truth.Truth.assertThat;
|
import static com.google.common.truth.Truth.assertThat;
|
||||||
import static com.google.common.truth.Truth8.assertThat;
|
|
||||||
import static google.registry.testing.CertificateSamples.SAMPLE_CERT;
|
import static google.registry.testing.CertificateSamples.SAMPLE_CERT;
|
||||||
import static google.registry.testing.CertificateSamples.SAMPLE_CERT3;
|
import static google.registry.testing.CertificateSamples.SAMPLE_CERT3;
|
||||||
import static google.registry.testing.CertificateSamples.SAMPLE_CERT3_HASH;
|
import static google.registry.testing.CertificateSamples.SAMPLE_CERT3_HASH;
|
||||||
|
|
|
@ -15,7 +15,6 @@
|
||||||
package google.registry.tools;
|
package google.registry.tools;
|
||||||
|
|
||||||
import static com.google.common.truth.Truth.assertThat;
|
import static com.google.common.truth.Truth.assertThat;
|
||||||
import static com.google.common.truth.Truth8.assertThat;
|
|
||||||
import static google.registry.model.tld.label.ReservationType.FULLY_BLOCKED;
|
import static google.registry.model.tld.label.ReservationType.FULLY_BLOCKED;
|
||||||
import static google.registry.testing.DatabaseHelper.createTlds;
|
import static google.registry.testing.DatabaseHelper.createTlds;
|
||||||
import static google.registry.testing.DatabaseHelper.persistReservedList;
|
import static google.registry.testing.DatabaseHelper.persistReservedList;
|
||||||
|
|
|
@ -15,7 +15,6 @@
|
||||||
package google.registry.tools;
|
package google.registry.tools;
|
||||||
|
|
||||||
import static com.google.common.truth.Truth.assertThat;
|
import static com.google.common.truth.Truth.assertThat;
|
||||||
import static com.google.common.truth.Truth8.assertThat;
|
|
||||||
import static google.registry.testing.DatabaseHelper.createTld;
|
import static google.registry.testing.DatabaseHelper.createTld;
|
||||||
import static google.registry.testing.DatabaseHelper.loadPremiumEntries;
|
import static google.registry.testing.DatabaseHelper.loadPremiumEntries;
|
||||||
import static google.registry.testing.DatabaseHelper.persistPremiumList;
|
import static google.registry.testing.DatabaseHelper.persistPremiumList;
|
||||||
|
|
|
@ -15,7 +15,6 @@
|
||||||
package google.registry.tools;
|
package google.registry.tools;
|
||||||
|
|
||||||
import static com.google.common.truth.Truth.assertThat;
|
import static com.google.common.truth.Truth.assertThat;
|
||||||
import static com.google.common.truth.Truth8.assertThat;
|
|
||||||
import static google.registry.testing.DatabaseHelper.createTld;
|
import static google.registry.testing.DatabaseHelper.createTld;
|
||||||
import static google.registry.testing.DatabaseHelper.persistReservedList;
|
import static google.registry.testing.DatabaseHelper.persistReservedList;
|
||||||
import static google.registry.testing.DatabaseHelper.persistResource;
|
import static google.registry.testing.DatabaseHelper.persistResource;
|
||||||
|
|
|
@ -15,7 +15,6 @@
|
||||||
package google.registry.tools;
|
package google.registry.tools;
|
||||||
|
|
||||||
import static com.google.common.truth.Truth.assertThat;
|
import static com.google.common.truth.Truth.assertThat;
|
||||||
import static com.google.common.truth.Truth8.assertThat;
|
|
||||||
import static org.junit.Assert.assertThrows;
|
import static org.junit.Assert.assertThrows;
|
||||||
|
|
||||||
import google.registry.model.console.GlobalRole;
|
import google.registry.model.console.GlobalRole;
|
||||||
|
|
|
@ -15,7 +15,6 @@
|
||||||
package google.registry.tools;
|
package google.registry.tools;
|
||||||
|
|
||||||
import static com.google.common.truth.Truth.assertThat;
|
import static com.google.common.truth.Truth.assertThat;
|
||||||
import static com.google.common.truth.Truth8.assertThat;
|
|
||||||
import static google.registry.batch.AsyncTaskEnqueuer.QUEUE_ASYNC_ACTIONS;
|
import static google.registry.batch.AsyncTaskEnqueuer.QUEUE_ASYNC_ACTIONS;
|
||||||
import static google.registry.testing.DatabaseHelper.assertNoBillingEvents;
|
import static google.registry.testing.DatabaseHelper.assertNoBillingEvents;
|
||||||
import static google.registry.testing.DatabaseHelper.createTlds;
|
import static google.registry.testing.DatabaseHelper.createTlds;
|
||||||
|
|
|
@ -15,7 +15,6 @@
|
||||||
package google.registry.tools;
|
package google.registry.tools;
|
||||||
|
|
||||||
import static com.google.common.truth.Truth.assertThat;
|
import static com.google.common.truth.Truth.assertThat;
|
||||||
import static com.google.common.truth.Truth8.assertThat;
|
|
||||||
import static google.registry.model.registrar.Registrar.State.ACTIVE;
|
import static google.registry.model.registrar.Registrar.State.ACTIVE;
|
||||||
import static google.registry.model.tld.Tld.TldState.GENERAL_AVAILABILITY;
|
import static google.registry.model.tld.Tld.TldState.GENERAL_AVAILABILITY;
|
||||||
import static google.registry.model.tld.Tld.TldState.START_DATE_SUNRISE;
|
import static google.registry.model.tld.Tld.TldState.START_DATE_SUNRISE;
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
|
|
||||||
package google.registry.tools;
|
package google.registry.tools;
|
||||||
|
|
||||||
import static com.google.common.truth.Truth8.assertThat;
|
import static com.google.common.truth.Truth.assertThat;
|
||||||
import static google.registry.persistence.transaction.TransactionManagerFactory.tm;
|
import static google.registry.persistence.transaction.TransactionManagerFactory.tm;
|
||||||
import static google.registry.testing.DatabaseHelper.persistResource;
|
import static google.registry.testing.DatabaseHelper.persistResource;
|
||||||
import static org.junit.jupiter.api.Assertions.assertThrows;
|
import static org.junit.jupiter.api.Assertions.assertThrows;
|
||||||
|
|
|
@ -15,7 +15,6 @@
|
||||||
package google.registry.tools;
|
package google.registry.tools;
|
||||||
|
|
||||||
import static com.google.common.truth.Truth.assertThat;
|
import static com.google.common.truth.Truth.assertThat;
|
||||||
import static com.google.common.truth.Truth8.assertThat;
|
|
||||||
import static google.registry.testing.DatabaseHelper.createTld;
|
import static google.registry.testing.DatabaseHelper.createTld;
|
||||||
import static google.registry.testing.DatabaseHelper.loadByKey;
|
import static google.registry.testing.DatabaseHelper.loadByKey;
|
||||||
import static google.registry.testing.DatabaseHelper.loadByKeyIfPresent;
|
import static google.registry.testing.DatabaseHelper.loadByKeyIfPresent;
|
||||||
|
|
|
@ -15,7 +15,6 @@
|
||||||
package google.registry.tools;
|
package google.registry.tools;
|
||||||
|
|
||||||
import static com.google.common.truth.Truth.assertThat;
|
import static com.google.common.truth.Truth.assertThat;
|
||||||
import static com.google.common.truth.Truth8.assertThat;
|
|
||||||
import static google.registry.testing.DatabaseHelper.createTld;
|
import static google.registry.testing.DatabaseHelper.createTld;
|
||||||
import static google.registry.testing.DatabaseHelper.loadAllOf;
|
import static google.registry.testing.DatabaseHelper.loadAllOf;
|
||||||
import static google.registry.testing.DatabaseHelper.loadByEntity;
|
import static google.registry.testing.DatabaseHelper.loadByEntity;
|
||||||
|
|
|
@ -15,7 +15,6 @@
|
||||||
package google.registry.tools;
|
package google.registry.tools;
|
||||||
|
|
||||||
import static com.google.common.truth.Truth.assertThat;
|
import static com.google.common.truth.Truth.assertThat;
|
||||||
import static com.google.common.truth.Truth8.assertThat;
|
|
||||||
import static google.registry.testing.CertificateSamples.SAMPLE_CERT;
|
import static google.registry.testing.CertificateSamples.SAMPLE_CERT;
|
||||||
import static google.registry.testing.CertificateSamples.SAMPLE_CERT3;
|
import static google.registry.testing.CertificateSamples.SAMPLE_CERT3;
|
||||||
import static google.registry.testing.CertificateSamples.SAMPLE_CERT3_HASH;
|
import static google.registry.testing.CertificateSamples.SAMPLE_CERT3_HASH;
|
||||||
|
|
|
@ -15,7 +15,6 @@
|
||||||
package google.registry.tools;
|
package google.registry.tools;
|
||||||
|
|
||||||
import static com.google.common.truth.Truth.assertThat;
|
import static com.google.common.truth.Truth.assertThat;
|
||||||
import static com.google.common.truth.Truth8.assertThat;
|
|
||||||
import static google.registry.model.tld.label.ReservationType.FULLY_BLOCKED;
|
import static google.registry.model.tld.label.ReservationType.FULLY_BLOCKED;
|
||||||
import static google.registry.testing.DatabaseHelper.persistReservedList;
|
import static google.registry.testing.DatabaseHelper.persistReservedList;
|
||||||
import static google.registry.testing.TestDataHelper.loadFile;
|
import static google.registry.testing.TestDataHelper.loadFile;
|
||||||
|
|
|
@ -15,7 +15,6 @@
|
||||||
package google.registry.tools;
|
package google.registry.tools;
|
||||||
|
|
||||||
import static com.google.common.truth.Truth.assertThat;
|
import static com.google.common.truth.Truth.assertThat;
|
||||||
import static com.google.common.truth.Truth8.assertThat;
|
|
||||||
import static google.registry.persistence.transaction.TransactionManagerFactory.tm;
|
import static google.registry.persistence.transaction.TransactionManagerFactory.tm;
|
||||||
import static org.junit.jupiter.api.Assertions.assertThrows;
|
import static org.junit.jupiter.api.Assertions.assertThrows;
|
||||||
|
|
||||||
|
|
|
@ -15,7 +15,6 @@
|
||||||
package google.registry.tools.params;
|
package google.registry.tools.params;
|
||||||
|
|
||||||
import static com.google.common.truth.Truth.assertThat;
|
import static com.google.common.truth.Truth.assertThat;
|
||||||
import static com.google.common.truth.Truth8.assertThat;
|
|
||||||
import static google.registry.tools.params.NameserversParameter.splitNameservers;
|
import static google.registry.tools.params.NameserversParameter.splitNameservers;
|
||||||
import static org.junit.jupiter.api.Assertions.assertThrows;
|
import static org.junit.jupiter.api.Assertions.assertThrows;
|
||||||
|
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
|
|
||||||
package google.registry.tools.params;
|
package google.registry.tools.params;
|
||||||
|
|
||||||
import static com.google.common.truth.Truth8.assertThat;
|
import static com.google.common.truth.Truth.assertThat;
|
||||||
import static org.junit.jupiter.api.Assertions.assertThrows;
|
import static org.junit.jupiter.api.Assertions.assertThrows;
|
||||||
|
|
||||||
import org.junit.jupiter.api.Test;
|
import org.junit.jupiter.api.Test;
|
||||||
|
|
|
@ -18,7 +18,6 @@ import static com.google.common.collect.Range.atLeast;
|
||||||
import static com.google.common.collect.Range.atMost;
|
import static com.google.common.collect.Range.atMost;
|
||||||
import static com.google.common.collect.Range.closed;
|
import static com.google.common.collect.Range.closed;
|
||||||
import static com.google.common.truth.Truth.assertThat;
|
import static com.google.common.truth.Truth.assertThat;
|
||||||
import static com.google.common.truth.Truth8.assertThat;
|
|
||||||
import static org.hamcrest.MatcherAssert.assertThat;
|
import static org.hamcrest.MatcherAssert.assertThat;
|
||||||
import static org.hamcrest.Matchers.equalTo;
|
import static org.hamcrest.Matchers.equalTo;
|
||||||
import static org.junit.jupiter.api.Assertions.assertThrows;
|
import static org.junit.jupiter.api.Assertions.assertThrows;
|
||||||
|
|
|
@ -15,7 +15,6 @@
|
||||||
package google.registry.ui.forms;
|
package google.registry.ui.forms;
|
||||||
|
|
||||||
import static com.google.common.truth.Truth.assertThat;
|
import static com.google.common.truth.Truth.assertThat;
|
||||||
import static com.google.common.truth.Truth8.assertThat;
|
|
||||||
import static org.hamcrest.MatcherAssert.assertThat;
|
import static org.hamcrest.MatcherAssert.assertThat;
|
||||||
import static org.hamcrest.Matchers.equalTo;
|
import static org.hamcrest.Matchers.equalTo;
|
||||||
import static org.junit.jupiter.api.Assertions.assertThrows;
|
import static org.junit.jupiter.api.Assertions.assertThrows;
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
|
|
||||||
package google.registry.ui.server;
|
package google.registry.ui.server;
|
||||||
|
|
||||||
import static com.google.common.truth.Truth8.assertThat;
|
import static com.google.common.truth.Truth.assertThat;
|
||||||
import static org.hamcrest.MatcherAssert.assertThat;
|
import static org.hamcrest.MatcherAssert.assertThat;
|
||||||
import static org.hamcrest.Matchers.equalTo;
|
import static org.hamcrest.Matchers.equalTo;
|
||||||
import static org.junit.jupiter.api.Assertions.assertThrows;
|
import static org.junit.jupiter.api.Assertions.assertThrows;
|
||||||
|
|
|
@ -16,7 +16,6 @@ package google.registry.ui.server.registrar;
|
||||||
|
|
||||||
import static com.google.common.net.HttpHeaders.LOCATION;
|
import static com.google.common.net.HttpHeaders.LOCATION;
|
||||||
import static com.google.common.truth.Truth.assertThat;
|
import static com.google.common.truth.Truth.assertThat;
|
||||||
import static com.google.common.truth.Truth8.assertThat;
|
|
||||||
import static google.registry.model.registrar.Registrar.loadByRegistrarId;
|
import static google.registry.model.registrar.Registrar.loadByRegistrarId;
|
||||||
import static google.registry.testing.DatabaseHelper.persistPremiumList;
|
import static google.registry.testing.DatabaseHelper.persistPremiumList;
|
||||||
import static javax.servlet.http.HttpServletResponse.SC_MOVED_TEMPORARILY;
|
import static javax.servlet.http.HttpServletResponse.SC_MOVED_TEMPORARILY;
|
||||||
|
|
|
@ -15,7 +15,6 @@
|
||||||
package google.registry.ui.server.registrar;
|
package google.registry.ui.server.registrar;
|
||||||
|
|
||||||
import static com.google.common.truth.Truth.assertThat;
|
import static com.google.common.truth.Truth.assertThat;
|
||||||
import static com.google.common.truth.Truth8.assertThat;
|
|
||||||
import static google.registry.model.ImmutableObjectSubject.assertAboutImmutableObjects;
|
import static google.registry.model.ImmutableObjectSubject.assertAboutImmutableObjects;
|
||||||
import static google.registry.testing.CertificateSamples.SAMPLE_CERT;
|
import static google.registry.testing.CertificateSamples.SAMPLE_CERT;
|
||||||
import static google.registry.testing.CertificateSamples.SAMPLE_CERT2;
|
import static google.registry.testing.CertificateSamples.SAMPLE_CERT2;
|
||||||
|
|
|
@ -15,7 +15,6 @@
|
||||||
package google.registry.whois;
|
package google.registry.whois;
|
||||||
|
|
||||||
import static com.google.common.truth.Truth.assertThat;
|
import static com.google.common.truth.Truth.assertThat;
|
||||||
import static com.google.common.truth.Truth8.assertThat;
|
|
||||||
import static google.registry.bsa.persistence.BsaTestingUtils.persistBsaLabel;
|
import static google.registry.bsa.persistence.BsaTestingUtils.persistBsaLabel;
|
||||||
import static google.registry.model.EppResourceUtils.loadByForeignKeyCached;
|
import static google.registry.model.EppResourceUtils.loadByForeignKeyCached;
|
||||||
import static google.registry.model.registrar.Registrar.State.ACTIVE;
|
import static google.registry.model.registrar.Registrar.State.ACTIVE;
|
||||||
|
|
|
@ -168,7 +168,6 @@ dependencies {
|
||||||
testRuntimeOnly deps['com.google.flogger:flogger-system-backend']
|
testRuntimeOnly deps['com.google.flogger:flogger-system-backend']
|
||||||
testImplementation deps['com.google.guava:guava']
|
testImplementation deps['com.google.guava:guava']
|
||||||
testImplementation deps['com.google.truth:truth']
|
testImplementation deps['com.google.truth:truth']
|
||||||
testImplementation deps['com.google.truth.extensions:truth-java8-extension']
|
|
||||||
testRuntimeOnly deps['io.github.java-diff-utils:java-diff-utils']
|
testRuntimeOnly deps['io.github.java-diff-utils:java-diff-utils']
|
||||||
testImplementation deps['org.junit.jupiter:junit-jupiter-api']
|
testImplementation deps['org.junit.jupiter:junit-jupiter-api']
|
||||||
testImplementation deps['org.junit.jupiter:junit-jupiter-engine']
|
testImplementation deps['org.junit.jupiter:junit-jupiter-engine']
|
||||||
|
|
|
@ -36,7 +36,8 @@ com.google.code.findbugs:jsr305:3.0.2=annotationProcessor,checkstyle,deploy_jar,
|
||||||
com.google.code.gson:gson:2.10.1=compileClasspath,deploy_jar,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
|
com.google.code.gson:gson:2.10.1=compileClasspath,deploy_jar,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
|
||||||
com.google.errorprone:error_prone_annotation:2.23.0=annotationProcessor,errorprone,testAnnotationProcessor
|
com.google.errorprone:error_prone_annotation:2.23.0=annotationProcessor,errorprone,testAnnotationProcessor
|
||||||
com.google.errorprone:error_prone_annotations:2.23.0=annotationProcessor,errorprone,testAnnotationProcessor
|
com.google.errorprone:error_prone_annotations:2.23.0=annotationProcessor,errorprone,testAnnotationProcessor
|
||||||
com.google.errorprone:error_prone_annotations:2.24.1=deploy_jar,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
|
com.google.errorprone:error_prone_annotations:2.24.1=deploy_jar,runtimeClasspath
|
||||||
|
com.google.errorprone:error_prone_annotations:2.25.0=testCompileClasspath,testRuntimeClasspath
|
||||||
com.google.errorprone:error_prone_annotations:2.7.1=checkstyle
|
com.google.errorprone:error_prone_annotations:2.7.1=checkstyle
|
||||||
com.google.errorprone:error_prone_check_api:2.23.0=annotationProcessor,errorprone,testAnnotationProcessor
|
com.google.errorprone:error_prone_check_api:2.23.0=annotationProcessor,errorprone,testAnnotationProcessor
|
||||||
com.google.errorprone:error_prone_core:2.23.0=annotationProcessor,errorprone,testAnnotationProcessor
|
com.google.errorprone:error_prone_core:2.23.0=annotationProcessor,errorprone,testAnnotationProcessor
|
||||||
|
@ -60,8 +61,7 @@ com.google.j2objc:j2objc-annotations:1.3=checkstyle
|
||||||
com.google.j2objc:j2objc-annotations:2.8=deploy_jar,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
|
com.google.j2objc:j2objc-annotations:2.8=deploy_jar,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
|
||||||
com.google.oauth-client:google-oauth-client:1.35.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
|
com.google.oauth-client:google-oauth-client:1.35.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
|
||||||
com.google.protobuf:protobuf-java:3.19.6=annotationProcessor,errorprone,testAnnotationProcessor
|
com.google.protobuf:protobuf-java:3.19.6=annotationProcessor,errorprone,testAnnotationProcessor
|
||||||
com.google.truth.extensions:truth-java8-extension:1.4.1=testCompileClasspath,testRuntimeClasspath
|
com.google.truth:truth:1.4.2=testCompileClasspath,testRuntimeClasspath
|
||||||
com.google.truth:truth:1.4.1=testCompileClasspath,testRuntimeClasspath
|
|
||||||
com.puppycrawl.tools:checkstyle:9.3=checkstyle
|
com.puppycrawl.tools:checkstyle:9.3=checkstyle
|
||||||
commons-beanutils:commons-beanutils:1.9.4=checkstyle
|
commons-beanutils:commons-beanutils:1.9.4=checkstyle
|
||||||
commons-codec:commons-codec:1.16.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
|
commons-codec:commons-codec:1.16.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
|
||||||
|
|
|
@ -18,7 +18,7 @@ public class NomulusPostgreSql {
|
||||||
|
|
||||||
/** The current PostgreSql version in Cloud SQL. */
|
/** The current PostgreSql version in Cloud SQL. */
|
||||||
// TODO(weiminyu): setup periodic checks to detect version changes in Cloud SQL.
|
// TODO(weiminyu): setup periodic checks to detect version changes in Cloud SQL.
|
||||||
private static final String TARGET_VERSION = "11.14";
|
private static final String TARGET_VERSION = "11.21-alpine";
|
||||||
|
|
||||||
/** Returns the docker image tag of the targeted Postgresql server version. */
|
/** Returns the docker image tag of the targeted Postgresql server version. */
|
||||||
public static String getDockerTag() {
|
public static String getDockerTag() {
|
||||||
|
|
|
@ -2,8 +2,8 @@
|
||||||
-- PostgreSQL database dump
|
-- PostgreSQL database dump
|
||||||
--
|
--
|
||||||
|
|
||||||
-- Dumped from database version 11.14 (Debian 11.14-1.pgdg90+1)
|
-- Dumped from database version 11.21
|
||||||
-- Dumped by pg_dump version 11.14 (Debian 11.14-1.pgdg90+1)
|
-- Dumped by pg_dump version 11.21
|
||||||
|
|
||||||
SET statement_timeout = 0;
|
SET statement_timeout = 0;
|
||||||
SET lock_timeout = 0;
|
SET lock_timeout = 0;
|
||||||
|
|
|
@ -16,8 +16,8 @@ package google.registry.sql.flyway;
|
||||||
|
|
||||||
import static com.google.common.collect.ImmutableList.toImmutableList;
|
import static com.google.common.collect.ImmutableList.toImmutableList;
|
||||||
import static com.google.common.collect.ImmutableSet.toImmutableSet;
|
import static com.google.common.collect.ImmutableSet.toImmutableSet;
|
||||||
|
import static com.google.common.truth.Truth.assertThat;
|
||||||
import static com.google.common.truth.Truth.assertWithMessage;
|
import static com.google.common.truth.Truth.assertWithMessage;
|
||||||
import static com.google.common.truth.Truth8.assertThat;
|
|
||||||
import static java.nio.charset.StandardCharsets.UTF_8;
|
import static java.nio.charset.StandardCharsets.UTF_8;
|
||||||
import static java.nio.file.Files.readAllLines;
|
import static java.nio.file.Files.readAllLines;
|
||||||
import static java.util.concurrent.TimeUnit.SECONDS;
|
import static java.util.concurrent.TimeUnit.SECONDS;
|
||||||
|
@ -45,8 +45,8 @@ import org.junit.jupiter.api.condition.EnabledIfSystemProperty;
|
||||||
* <p>Flyway deploys each DDL script in one transaction. If a script modifies multiple schema
|
* <p>Flyway deploys each DDL script in one transaction. If a script modifies multiple schema
|
||||||
* elements (table, index, sequence), it MAY hit deadlocks when applied on sandbox/production where
|
* elements (table, index, sequence), it MAY hit deadlocks when applied on sandbox/production where
|
||||||
* it'll be competing against live traffic that may also be locking said elements but in a different
|
* it'll be competing against live traffic that may also be locking said elements but in a different
|
||||||
* order. This test checks every new script to be merged, counts the elements it locks, and raise an
|
* order. This test checks every new script to be merged, counts the elements it locks, and raises
|
||||||
* error when there are more than one locked elements.
|
* an error when there is more than one locked element.
|
||||||
*
|
*
|
||||||
* <p>For deadlock-prevention purpose, we can ignore elements being created or dropped: our
|
* <p>For deadlock-prevention purpose, we can ignore elements being created or dropped: our
|
||||||
* schema-server compatibility tests ensure that such elements are not accessed by live traffic.
|
* schema-server compatibility tests ensure that such elements are not accessed by live traffic.
|
||||||
|
|
|
@ -77,7 +77,7 @@ class SchemaTest {
|
||||||
* easier to update the golden schema this way.
|
* easier to update the golden schema this way.
|
||||||
*/
|
*/
|
||||||
@Container
|
@Container
|
||||||
private PostgreSQLContainer sqlContainer =
|
private final PostgreSQLContainer<?> sqlContainer =
|
||||||
new PostgreSQLContainer<>(NomulusPostgreSql.getDockerTag())
|
new PostgreSQLContainer<>(NomulusPostgreSql.getDockerTag())
|
||||||
.withClasspathResourceMapping(
|
.withClasspathResourceMapping(
|
||||||
MOUNTED_RESOURCE_PATH, CONTAINER_MOUNT_POINT, BindMode.READ_WRITE);
|
MOUNTED_RESOURCE_PATH, CONTAINER_MOUNT_POINT, BindMode.READ_WRITE);
|
||||||
|
@ -116,7 +116,7 @@ class SchemaTest {
|
||||||
@Test
|
@Test
|
||||||
@EnabledIfSystemProperty(named = "deploy_to_existing_db", matches = ".*")
|
@EnabledIfSystemProperty(named = "deploy_to_existing_db", matches = ".*")
|
||||||
void deploySchema_existingDb() {
|
void deploySchema_existingDb() {
|
||||||
// Initialize database with the base schema, which is on the classpath.
|
// Initialize the database with the base schema, which is on the classpath.
|
||||||
Flyway flyway =
|
Flyway flyway =
|
||||||
Flyway.configure()
|
Flyway.configure()
|
||||||
.locations("sql/flyway")
|
.locations("sql/flyway")
|
||||||
|
|
|
@ -161,7 +161,6 @@ ext {
|
||||||
'com.google.protobuf:protobuf-java:[3.13.0,3.25.3]',
|
'com.google.protobuf:protobuf-java:[3.13.0,3.25.3]',
|
||||||
'com.google.protobuf:protobuf-java-util:[3.17.3,)',
|
'com.google.protobuf:protobuf-java-util:[3.17.3,)',
|
||||||
'com.google.re2j:re2j:[1.6,)',
|
'com.google.re2j:re2j:[1.6,)',
|
||||||
'com.google.truth.extensions:truth-java8-extension:[1.1.2,)',
|
|
||||||
'com.google.truth:truth:[1.1.2,)',
|
'com.google.truth:truth:[1.1.2,)',
|
||||||
'com.googlecode.json-simple:json-simple:[1.1.1,)',
|
'com.googlecode.json-simple:json-simple:[1.1.1,)',
|
||||||
'com.ibm.icu:icu4j:[68.2,)',
|
'com.ibm.icu:icu4j:[68.2,)',
|
||||||
|
@ -226,11 +225,11 @@ ext {
|
||||||
'org.eclipse.jetty:jetty-server:[9.4.49.v20220914,)',
|
'org.eclipse.jetty:jetty-server:[9.4.49.v20220914,)',
|
||||||
'org.eclipse.jetty:jetty-servlet:[9.4.49.v20220914,)',
|
'org.eclipse.jetty:jetty-servlet:[9.4.49.v20220914,)',
|
||||||
'org.slf4j:slf4j-jdk14:[1.7.28,)',
|
'org.slf4j:slf4j-jdk14:[1.7.28,)',
|
||||||
'org.testcontainers:jdbc:[1.15.2,)',
|
'org.testcontainers:jdbc:[1.19.6,)',
|
||||||
'org.testcontainers:junit-jupiter:[1.15.2,)',
|
'org.testcontainers:junit-jupiter:[1.19.6,)',
|
||||||
'org.testcontainers:postgresql:[1.15.2,)',
|
'org.testcontainers:postgresql:[1.19.6,)',
|
||||||
'org.testcontainers:selenium:[1.15.2,)',
|
'org.testcontainers:selenium:[1.19.6,)',
|
||||||
'org.testcontainers:testcontainers:[1.15.2,)',
|
'org.testcontainers:testcontainers:[1.19.6,)',
|
||||||
'org.yaml:snakeyaml:[1.17,)',
|
'org.yaml:snakeyaml:[1.17,)',
|
||||||
'xerces:xmlParserAPIs:[2.6.2,)',
|
'xerces:xmlParserAPIs:[2.6.2,)',
|
||||||
]
|
]
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
# This file defines properties used by the gradle build. It must be kept in
|
# This file defines properties used by the Gradle build. It must be kept in
|
||||||
# sync with config/nom_build.py.
|
# sync with config/nom_build.py.
|
||||||
#
|
#
|
||||||
# To regenerate, run ./nom_build --generate-gradle-properties
|
# To regenerate, run ./nom_build --generate-gradle-properties
|
||||||
|
@ -9,6 +9,7 @@
|
||||||
# DO NOT EDIT THIS FILE BY HAND
|
# DO NOT EDIT THIS FILE BY HAND
|
||||||
org.gradle.jvmargs=-Xmx1024m
|
org.gradle.jvmargs=-Xmx1024m
|
||||||
org.gradle.caching=true
|
org.gradle.caching=true
|
||||||
|
org.gradle.parallel=true
|
||||||
mavenUrl=
|
mavenUrl=
|
||||||
pluginsUrl=
|
pluginsUrl=
|
||||||
allowInsecureProtocol=
|
allowInsecureProtocol=
|
||||||
|
|
|
@ -88,6 +88,7 @@ test {
|
||||||
//
|
//
|
||||||
// A typical use case is to run tests from desktop that accesses Cloud resources.
|
// A typical use case is to run tests from desktop that accesses Cloud resources.
|
||||||
tasks.withType(Test).configureEach {
|
tasks.withType(Test).configureEach {
|
||||||
|
maxHeapSize = "4096m"
|
||||||
def gcp_integration_env_property = 'test.gcp_integration.env'
|
def gcp_integration_env_property = 'test.gcp_integration.env'
|
||||||
|
|
||||||
if (project.hasProperty(gcp_integration_env_property)) {
|
if (project.hasProperty(gcp_integration_env_property)) {
|
||||||
|
|
4
jetty/buildscript-gradle.lockfile
Normal file
4
jetty/buildscript-gradle.lockfile
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
# This is a Gradle generated file for dependency locking.
|
||||||
|
# Manual edits can break the build and are not advised.
|
||||||
|
# This file is expected to be part of source control.
|
||||||
|
empty=classpath
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue