Skip to content

Commit

Permalink
fix(java): enable skipped tests for Native Image testing (#1234)
Browse files Browse the repository at this point in the history
* 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://togithub.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://togithub.com/googleapis/java-shared-dependencies/blob/HEAD/CHANGELOG.md#&#8203;2120-httpsgithubcomgoogleapisjava-shared-dependenciescomparev2110v2120-2022-05-19)

[Compare Source](https://togithub.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://togithub.com/googleapis/java-shared-dependencies/issues/1440)) ([#&#8203;697](https://togithub.com/googleapis/java-shared-dependencies/issues/697)) ([f10ec4e](https://togithub.com/googleapis/java-shared-dependencies/commit/f10ec4e664d8fde868effe366b7182a5fad08dd0))

##### Dependencies

-   update gax.version to v2.18.1 ([#&#8203;695](https://togithub.com/googleapis/java-shared-dependencies/issues/695)) ([09bc61c](https://togithub.com/googleapis/java-shared-dependencies/commit/09bc61c9152a99bfe87554a07324f15ae6217d6e))
-   update google.core.version to v2.7.1 ([#&#8203;698](https://togithub.com/googleapis/java-shared-dependencies/issues/698)) ([43de259](https://togithub.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 <[email protected]>
Co-authored-by: gcf-owl-bot[bot] <78513119+gcf-owl-bot[bot]@users.noreply.github.com>
Co-authored-by: kolea2 <[email protected]>
  • Loading branch information
5 people authored May 26, 2022
1 parent 6fdc2c1 commit 560a501
Show file tree
Hide file tree
Showing 7 changed files with 49 additions and 5 deletions.
9 changes: 8 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,4 +68,11 @@ mvn install -DskipUnitTests

# To skip all tests
mvn install -DskipTests
```
```


## Native Image Testing
Native Image testing is enabled for tests that follow a particular naming
convention (`IT*` or `*ClientTest`). Unit tests that use Mockito or EasyMock
have been excluded for the time being as they are not compatible with native
image compilation.
1 change: 1 addition & 0 deletions google-cloud-bigtable-emulator/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@
<groupId>com.google.api</groupId>
<artifactId>api-common</artifactId>
</dependency>

<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"resources":{
"includes":[
{
"pattern":"\\Qgcloud/bigtable-linux-x86_64/platform/bigtable-emulator/cbtemulator\\E"
},
{
"pattern":"\\Qgcloud/bigtable-darwin-x86_64/platform/bigtable-emulator/cbtemulator\\E"
},
{
"pattern":"\\Qgcloud/bigtable-linux-x86/platform/bigtable-emulator/cbtemulator\\E"
},
{
"pattern": "\\Qgcloud/bigtable-windows-x86_64/platform/bigtable-emulator/cbtemulator.exe\\E"
},
{
"pattern":"\\Qgcloud/bigtable-linux-arm/platform/bigtable-emulator/cbtemulator\\E"
}
]},
"bundles":[]
}
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
import org.junit.runners.JUnit4;

@RunWith(JUnit4.class)
public class BigtableEmulatorRuleTest {
public class ITBigtableEmulatorRuleTest {
@Rule public BigtableEmulatorRule bigtableRule = BigtableEmulatorRule.create();
private BigtableTableAdminBlockingStub tableAdminStub;
private BigtableBlockingStub dataStub;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,12 @@
import org.mockito.stubbing.Answer;

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

private static final String PROJECT_ID = "my-project";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,12 @@
import org.threeten.bp.Instant;

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

private static final String PROJECT_ID = "my-project";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,12 @@
import org.mockito.stubbing.Answer;

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

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

Expand Down

0 comments on commit 560a501

Please sign in to comment.