File tree Expand file tree Collapse file tree 6 files changed +30
-5
lines changed
java/com/google/cloud/spanner Expand file tree Collapse file tree 6 files changed +30
-5
lines changed Original file line number Diff line number Diff line change @@ -104,6 +104,21 @@ integration)
104104 verify
105105 RETURN_CODE=$?
106106 ;;
107+ integration-regular-sessions)
108+ mvn -B ${INTEGRATION_TEST_ARGS} \
109+ -ntp \
110+ -Penable-integration-tests \
111+ -Djava.net.preferIPv4Stack=true \
112+ -DtrimStackTrace=false \
113+ -Dclirr.skip=true \
114+ -Denforcer.skip=true \
115+ -Dmaven.main.skip=true \
116+ -Dspanner.gce.config.project_id=gcloud-devel \
117+ -Dspanner.testenv.instance=projects/gcloud-devel/instances/java-client-integration-tests-regular-sessions \
118+ -fae \
119+ verify
120+ RETURN_CODE=$?
121+ ;;
107122integration-directpath-enabled)
108123 mvn -B ${INTEGRATION_TEST_ARGS} \
109124 -ntp \
Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ env_vars: {
88
99env_vars: {
1010 key: " JOB_TYPE"
11- value: " integration"
11+ value: " integration-regular-sessions "
1212}
1313
1414# TODO: remove this after we've migrated all tests and scripts
Original file line number Diff line number Diff line change 6464 <spanner .testenv.instance>${spanner.testenv.instance} </spanner .testenv.instance>
6565 <spanner .gce.config.project_id>${spanner.gce.config.project_id} </spanner .gce.config.project_id>
6666 <spanner .testenv.kms_key.name>${spanner.testenv.kms_key.name} </spanner .testenv.kms_key.name>
67+ <java .util.logging.config.file>logging.properties</java .util.logging.config.file>
6768 </systemPropertyVariables >
6869
6970 </configuration >
Original file line number Diff line number Diff line change @@ -141,8 +141,7 @@ protected void before() throws Throwable {
141141 .anyMatch (testEnvOption -> TestEnvOptions .USE_END_TO_END_TRACING .equals (testEnvOption ))) {
142142 // OpenTelemetry set up for enabling End to End tracing for all integration test env.
143143 // The gRPC stub and connections are created during test env set up using SpannerOptions and
144- // are
145- // reused for executing statements.
144+ // are reused for executing statements.
146145 options = spannerOptionsWithEndToEndTracing (options );
147146 }
148147 String instanceProperty = System .getProperty (TEST_INSTANCE_PROPERTY , "" );
@@ -293,7 +292,7 @@ static boolean isRetryableResourceExhaustedException(SpannerException exception)
293292 }
294293
295294 private void cleanUpOldDatabases (InstanceId instanceId ) {
296- long OLD_DB_THRESHOLD_SECS = TimeUnit .SECONDS .convert (6L , TimeUnit .HOURS );
295+ long OLD_DB_THRESHOLD_SECS = TimeUnit .SECONDS .convert (2L , TimeUnit .HOURS );
297296 Timestamp currentTimestamp = Timestamp .now ();
298297 int numDropped = 0 ;
299298 String TEST_DB_REGEX = "(testdb_(.*)_(.*))|(mysample-(.*))" ;
Original file line number Diff line number Diff line change 4444import java .io .ByteArrayOutputStream ;
4545import java .io .OutputStream ;
4646import java .util .concurrent .TimeUnit ;
47+ import java .util .logging .ConsoleHandler ;
4748import java .util .logging .Handler ;
4849import java .util .logging .Logger ;
4950import java .util .logging .StreamHandler ;
@@ -211,7 +212,8 @@ private void attachLogCapturer() {
211212 currentLogger = currentLogger .getParent ();
212213 }
213214 if (handlers .length == 0 ) {
214- throw new IllegalStateException ("no handlers found for logger" );
215+ handlers = new Handler [1 ];
216+ handlers [0 ] = new ConsoleHandler ();
215217 }
216218 customLogHandler = new StreamHandler (logCapturingStream , handlers [0 ].getFormatter ());
217219 useParentHandlers = log .getUseParentHandlers ();
@@ -267,6 +269,7 @@ public void testRemoveConnectionConnectionAlreadyRemoved() {
267269
268270 @ Test
269271 public void testCloseSpanner () {
272+ attachLogCapturer ();
270273 SpannerPool pool = createSubjectAndMocks ();
271274 Spanner spanner = pool .getSpanner (options1 , connection1 );
272275 // verify that closing is not possible until all connections have been removed
Original file line number Diff line number Diff line change 1+ .level =INFO
2+ .handlers =java.util.logging.ConsoleHandler
3+ java.util.logging.ConsoleHandler.level =INFO
4+ java.util.logging.Logger.useParentHandlers =true
5+
6+ # Set log level to WARN for SpannerImpl to prevent log spamming of the Spanner configuration.
7+ com.google.cloud.spanner.SpannerImpl.LEVEL =WARN
You can’t perform that action at this time.
0 commit comments