Skip to content

Commit 560a501

Browse files
mpeddada1gcf-owl-bot[bot]renovate-botkolea2
authored
fix(java): enable skipped tests for Native Image testing (#1234)
* make gax-grpc a test scope dependency * add resource config * skip tests that use mockito * fix dependency issue * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * add gax as main dependency; include supported architectures * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * fix dependency issue * add documentation; rever unnecessary changes * add documentation for exclusion * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * resolve conflicts * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * relocate gax-grpc dependency within pom.xml * try making gax-grpc provided * explicitly include netty native image configurations * remove gax from used dep setting * deps: update dependency com.google.cloud:google-cloud-shared-dependencies to v2.11.0 (#1253) * feat: add build scripts for native image testing in Java 17 (#1440) (#1255) Source-Link: googleapis/synthtool@505ce5a Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-java:latest@sha256:2567a120ce90fadb6201999b87d649d9f67459de28815ad239bce9ebfaa18a74 Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com> * deps: update dependency com.google.cloud:google-cloud-shared-dependencies to v2.12.0 (#1256) [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:google-cloud-shared-dependencies](https://github.com/googleapis/java-shared-dependencies) | `2.11.0` -> `2.12.0` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-dependencies/2.12.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-dependencies/2.12.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-dependencies/2.12.0/compatibility-slim/2.11.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-dependencies/2.12.0/confidence-slim/2.11.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes <details> <summary>googleapis/java-shared-dependencies</summary> ### [`v2.12.0`](https://github.com/googleapis/java-shared-dependencies/blob/HEAD/CHANGELOG.md#&#8203;2120-httpsgithubcomgoogleapisjava-shared-dependenciescomparev2110v2120-2022-05-19) [Compare Source](https://github.com/googleapis/java-shared-dependencies/compare/v2.11.0...v2.12.0) ##### Features - add build scripts for native image testing in Java 17 ([#&#8203;1440](https://github.com/googleapis/java-shared-dependencies/issues/1440)) ([#&#8203;697](https://github.com/googleapis/java-shared-dependencies/issues/697)) ([f10ec4e](https://github.com/googleapis/java-shared-dependencies/commit/f10ec4e664d8fde868effe366b7182a5fad08dd0)) ##### Dependencies - update gax.version to v2.18.1 ([#&#8203;695](https://github.com/googleapis/java-shared-dependencies/issues/695)) ([09bc61c](https://github.com/googleapis/java-shared-dependencies/commit/09bc61c9152a99bfe87554a07324f15ae6217d6e)) - update google.core.version to v2.7.1 ([#&#8203;698](https://github.com/googleapis/java-shared-dependencies/issues/698)) ([43de259](https://github.com/googleapis/java-shared-dependencies/commit/43de2593f1a6e8fa5e34799364ab683246ddd449)) </details> --- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-bigtable). * build(fix): add in IT args for graalvm presubmit (#1258) * build(fix): add in IT args for graalvm presubmit * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * Update owlbot.py * it changes * update graalvm config * owlbot * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * Update graalvm-native.cfg Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com> * remove netty configs * fix pom.xml Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com> Co-authored-by: WhiteSource Renovate <bot@renovateapp.com> Co-authored-by: gcf-owl-bot[bot] <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Co-authored-by: kolea2 <45548808+kolea2@users.noreply.github.com>
1 parent 6fdc2c1 commit 560a501

File tree

7 files changed

+49
-5
lines changed

7 files changed

+49
-5
lines changed

CONTRIBUTING.md

+8-1
Original file line numberDiff line numberDiff line change
@@ -68,4 +68,11 @@ mvn install -DskipUnitTests
6868

6969
# To skip all tests
7070
mvn install -DskipTests
71-
```
71+
```
72+
73+
74+
## Native Image Testing
75+
Native Image testing is enabled for tests that follow a particular naming
76+
convention (`IT*` or `*ClientTest`). Unit tests that use Mockito or EasyMock
77+
have been excluded for the time being as they are not compatible with native
78+
image compilation.

google-cloud-bigtable-emulator/pom.xml

+1
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,7 @@
106106
<groupId>com.google.api</groupId>
107107
<artifactId>api-common</artifactId>
108108
</dependency>
109+
109110
<dependency>
110111
<groupId>com.google.guava</groupId>
111112
<artifactId>guava</artifactId>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"resources":{
3+
"includes":[
4+
{
5+
"pattern":"\\Qgcloud/bigtable-linux-x86_64/platform/bigtable-emulator/cbtemulator\\E"
6+
},
7+
{
8+
"pattern":"\\Qgcloud/bigtable-darwin-x86_64/platform/bigtable-emulator/cbtemulator\\E"
9+
},
10+
{
11+
"pattern":"\\Qgcloud/bigtable-linux-x86/platform/bigtable-emulator/cbtemulator\\E"
12+
},
13+
{
14+
"pattern": "\\Qgcloud/bigtable-windows-x86_64/platform/bigtable-emulator/cbtemulator.exe\\E"
15+
},
16+
{
17+
"pattern":"\\Qgcloud/bigtable-linux-arm/platform/bigtable-emulator/cbtemulator\\E"
18+
}
19+
]},
20+
"bundles":[]
21+
}

google-cloud-bigtable-emulator/src/test/java/com/google/cloud/bigtable/emulator/v2/BigtableEmulatorRuleTest.java google-cloud-bigtable-emulator/src/test/java/com/google/cloud/bigtable/emulator/v2/ITBigtableEmulatorRuleTest.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
import org.junit.runners.JUnit4;
3939

4040
@RunWith(JUnit4.class)
41-
public class BigtableEmulatorRuleTest {
41+
public class ITBigtableEmulatorRuleTest {
4242
@Rule public BigtableEmulatorRule bigtableRule = BigtableEmulatorRule.create();
4343
private BigtableTableAdminBlockingStub tableAdminStub;
4444
private BigtableBlockingStub dataStub;

google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/BigtableInstanceAdminClientTest.java google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/BigtableInstanceAdminClientTests.java

+6-1
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,12 @@
8181
import org.mockito.stubbing.Answer;
8282

8383
@RunWith(JUnit4.class)
84-
public class BigtableInstanceAdminClientTest {
84+
/**
85+
* Tests for {@link BigtableTableAdminClient}. This test class uses Mockito so it has been
86+
* explicitly excluded from Native Image testing by not following the naming convention of (IT* and
87+
* *ClientTest).
88+
*/
89+
public class BigtableInstanceAdminClientTests {
8590
@Rule public MockitoRule mockitoRule = MockitoJUnit.rule().strictness(Strictness.WARN);
8691

8792
private static final String PROJECT_ID = "my-project";

google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/BigtableTableAdminClientTest.java google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/BigtableTableAdminClientTests.java

+6-1
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,12 @@
9191
import org.threeten.bp.Instant;
9292

9393
@RunWith(JUnit4.class)
94-
public class BigtableTableAdminClientTest {
94+
/**
95+
* Tests for {@link BigtableTableAdminClient}. This test class uses Mockito so it has been
96+
* explicitly excluded from Native Image testing by not following the naming convention of (IT* and
97+
* *ClientTest).
98+
*/
99+
public class BigtableTableAdminClientTests {
95100
@Rule public final MockitoRule mockitoRule = MockitoJUnit.rule();
96101

97102
private static final String PROJECT_ID = "my-project";

google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/BigtableDataClientTest.java google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/BigtableDataClientTests.java

+6-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,12 @@
5656
import org.mockito.stubbing.Answer;
5757

5858
@RunWith(JUnit4.class)
59-
public class BigtableDataClientTest {
59+
/**
60+
* Tests for {@link BigtableDataClient}. This test class uses Mockito so it has been explicitly
61+
* excluded from Native Image testing by not following the naming convention of (IT* and
62+
* *ClientTest).
63+
*/
64+
public class BigtableDataClientTests {
6065

6166
@Rule public MockitoRule mockitoRule = MockitoJUnit.rule().strictness(Strictness.WARN);
6267

0 commit comments

Comments
 (0)