mirror of
https://github.com/google/nomulus.git
synced 2025-05-09 08:18:21 +02:00
We create an injectable LockHandler that just calls the static Lock.executeWithLocks function. I'm not sure what's the correct place to put the LockHandler. I think model/server is only appropriate for the actual datastore lock. This is a "per request" lock, so maybe request/lock? ----------------------------- This is the initial step in adding the "lock implicitly released on request death" feature, but it's also useful on its own - easier to test Actions when we can use a fake lock. To keep this CL simple, we keep using the old Lock as is in most places. We just choose a single example to convert to LockHandler to showcase it. Converting all other uses will be in a subsequent CL. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=167357564
59 lines
1.9 KiB
Text
59 lines
1.9 KiB
Text
package(
|
|
default_testonly = 1,
|
|
default_visibility = ["//visibility:public"],
|
|
)
|
|
|
|
licenses(["notice"]) # Apache 2.0
|
|
|
|
java_library(
|
|
name = "testing",
|
|
srcs = glob(
|
|
["*.java"],
|
|
exclude = [
|
|
"FakeProxyConnectionMetadataProvider.java",
|
|
"FakeQuotaServerClient.java",
|
|
],
|
|
),
|
|
resources = [
|
|
"logging.properties",
|
|
"//java/google/registry:env/common/default/WEB-INF/datastore-indexes.xml",
|
|
"//java/google/registry:env/common/default/WEB-INF/queue.xml",
|
|
] + glob(["*.csv"]) + glob(["testdata/*"]),
|
|
deps = [
|
|
"//java/google/registry/config",
|
|
"//java/google/registry/dns:constants",
|
|
"//java/google/registry/dns/writer",
|
|
"//java/google/registry/flows",
|
|
"//java/google/registry/keyring/api",
|
|
"//java/google/registry/model",
|
|
"//java/google/registry/monitoring/whitebox",
|
|
"//java/google/registry/pricing",
|
|
"//java/google/registry/request",
|
|
"//java/google/registry/request/lock",
|
|
"//java/google/registry/tmch",
|
|
"//java/google/registry/util",
|
|
"//java/google/registry/xml",
|
|
"//third_party/java/objectify:objectify-v4_1",
|
|
"@com_google_appengine_api_1_0_sdk//:testonly",
|
|
"@com_google_appengine_api_stubs",
|
|
"@com_google_appengine_testing",
|
|
"@com_google_appengine_tools_appengine_gcs_client",
|
|
"@com_google_appengine_tools_sdk",
|
|
"@com_google_auto_value",
|
|
"@com_google_code_findbugs_jsr305",
|
|
"@com_google_dagger",
|
|
"@com_google_guava",
|
|
"@com_google_guava_testlib",
|
|
"@com_google_truth",
|
|
"@com_googlecode_json_simple",
|
|
"@javax_inject",
|
|
"@javax_servlet_api",
|
|
"@joda_time",
|
|
"@junit",
|
|
"@org_bouncycastle_bcpg_jdk15on",
|
|
"@org_bouncycastle_bcpkix_jdk15on",
|
|
"@org_joda_money",
|
|
"@org_json",
|
|
"@org_mockito_all",
|
|
],
|
|
)
|