File tree Expand file tree Collapse file tree 6 files changed +35
-0
lines changed
main/java/com/example/spanner/helper
test/java/com/example/spanner Expand file tree Collapse file tree 6 files changed +35
-0
lines changed Original file line number Diff line number Diff line change 147147 <artifactId >maven-failsafe-plugin</artifactId >
148148 <version >3.5.2</version >
149149 <configuration >
150+ <forkCount >10</forkCount >
151+ <reuseForks >false</reuseForks >
150152 <systemPropertyVariables >
151153 <spanner .test.instance>java-sample-integration-tests</spanner .test.instance>
152154 <spanner .test.instance.mr>java-client-mr-integration-tests</spanner .test.instance.mr>
157159 <spanner .sample.database>mysample</spanner .sample.database>
158160 <spanner .quickstart.database>quick-db</spanner .quickstart.database>
159161 </systemPropertyVariables >
162+ <excludedGroups >com.example.spanner.helper.SlowTest</excludedGroups >
160163 </configuration >
161164 </plugin >
162165 </plugins >
Original file line number Diff line number Diff line change 146146 <artifactId >maven-failsafe-plugin</artifactId >
147147 <version >3.5.2</version >
148148 <configuration >
149+ <forkCount >10</forkCount >
150+ <reuseForks >false</reuseForks >
149151 <systemPropertyVariables >
150152 <spanner .test.instance>java-sample-integration-tests</spanner .test.instance>
151153 <spanner .test.instance.mr>java-client-mr-integration-tests</spanner .test.instance.mr>
157159 <spanner .sample.instance>mysample-instance</spanner .sample.instance>
158160 <spanner .quickstart.database>quick-db</spanner .quickstart.database>
159161 </systemPropertyVariables >
162+ <excludedGroups >com.example.spanner.helper.SlowTest</excludedGroups >
160163 </configuration >
161164 </plugin >
162165 </plugins >
Original file line number Diff line number Diff line change 177177 <artifactId >maven-failsafe-plugin</artifactId >
178178 <version >3.5.2</version >
179179 <configuration >
180+ <forkCount >10</forkCount >
181+ <reuseForks >false</reuseForks >
180182 <systemPropertyVariables >
181183 <spanner .test.instance>java-sample-integration-tests</spanner .test.instance>
182184 <spanner .test.instance.mr>java-client-mr-integration-tests</spanner .test.instance.mr>
187189 <spanner .sample.database>mysample</spanner .sample.database>
188190 <spanner .quickstart.database>quick-db</spanner .quickstart.database>
189191 </systemPropertyVariables >
192+ <excludedGroups >com.example.spanner.helper.SlowTest</excludedGroups >
190193 </configuration >
191194 </plugin >
192195 <plugin >
Original file line number Diff line number Diff line change 1+ /*
2+ * Copyright 2024 Google LLC
3+ *
4+ * Licensed under the Apache License, Version 2.0 (the "License");
5+ * you may not use this file except in compliance with the License.
6+ * You may obtain a copy of the License at
7+ *
8+ * http://www.apache.org/licenses/LICENSE-2.0
9+ *
10+ * Unless required by applicable law or agreed to in writing, software
11+ * distributed under the License is distributed on an "AS IS" BASIS,
12+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+ * See the License for the specific language governing permissions and
14+ * limitations under the License.
15+ */
16+
17+ package com .example .spanner .helper ;
18+
19+ /* Interface for slow tests */
20+ public interface SlowTest { }
Original file line number Diff line number Diff line change 1919import static com .google .common .truth .Truth .assertThat ;
2020import static org .junit .Assert .assertTrue ;
2121
22+ import com .example .spanner .helper .SlowTest ;
2223import com .google .cloud .Timestamp ;
2324import com .google .cloud .spanner .DatabaseId ;
2425import com .google .cloud .spanner .ErrorCode ;
5152import org .junit .Assert ;
5253import org .junit .BeforeClass ;
5354import org .junit .Test ;
55+ import org .junit .experimental .categories .Category ;
5456import org .junit .runner .RunWith ;
5557import org .junit .runners .JUnit4 ;
5658
5759/** Unit tests for {@code SpannerSample} */
5860@ RunWith (JUnit4 .class )
5961@ SuppressWarnings ("checkstyle:abbreviationaswordinname" )
62+ @ Category (SlowTest .class )
6063public class SpannerSampleIT extends SampleTestBaseV2 {
6164
6265 private static final int DBID_LENGTH = 20 ;
Original file line number Diff line number Diff line change 2020import static org .junit .Assert .assertTrue ;
2121
2222import com .example .spanner .SampleRunner ;
23+ import com .example .spanner .helper .SlowTest ;
2324import com .google .cloud .Timestamp ;
2425import com .google .cloud .spanner .Backup ;
2526import com .google .cloud .spanner .BackupId ;
4849import org .junit .AfterClass ;
4950import org .junit .BeforeClass ;
5051import org .junit .Test ;
52+ import org .junit .experimental .categories .Category ;
5153import org .junit .runner .RunWith ;
5254import org .junit .runners .JUnit4 ;
5355import org .threeten .bp .LocalDate ;
5658/** Unit tests for {@code SpannerSample} */
5759@ RunWith (JUnit4 .class )
5860@ SuppressWarnings ("checkstyle:abbreviationaswordinname" )
61+ @ Category (SlowTest .class )
5962public class SpannerSampleIT {
6063 private static final int DBID_LENGTH = 20 ;
6164 // The instance needs to exist for tests to pass.
You can’t perform that action at this time.
0 commit comments