Skip to content

Commit 132b4e4

Browse files
feat: add test proxy to java-bigtable client (#1498)
* feat: add test proxy to java-bigtable client * udpate * update * remove shading plugin * make client version a variable * add a read me * rebase and update version * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * nit Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
1 parent fb5ce88 commit 132b4e4

File tree

6 files changed

+1213
-0
lines changed

6 files changed

+1213
-0
lines changed

test-proxy/EnableAutoValue.txt

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
This is a marker file to trigger auto-value injection into the annotation processor path
2+
https://github.com/googleapis/java-shared-config/blob/51c9f68ff1736761b21c921f078ab2c8675ff268/pom.xml#L758

test-proxy/README.md

+46
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# CBT Java Test Proxy
2+
3+
The CBT test proxy is intended for running confromance tests for Cloug Bigtable Java Client.
4+
5+
## Set up
6+
7+
If you have not already done so, [install golang](https://go.dev/doc/install), then clone the go test library:
8+
9+
```
10+
git clone https://github.com/googleapis/cloud-bigtable-clients-test.git
11+
```
12+
13+
## Start test proxy
14+
15+
Build the proxy with the latest version of the client
16+
17+
```
18+
cd java-bigtable/test-proxy
19+
mvn clean install
20+
```
21+
22+
Start the proxy on default port 9999
23+
24+
```
25+
mvn exec:java -Dexec.mainClass=com.google.cloud.bigtable.testproxy.CbtTestProxyMain
26+
```
27+
28+
Start the proxy on a different port
29+
30+
```
31+
mvn exec:java -Dexec.mainClass=com.google.cloud.bigtable.testproxy.CbtTestProxyMain -Dport=1
32+
```
33+
34+
Build and start the proxy with an older version of the client
35+
36+
```
37+
mvn clean install -Dbigtable.client.version=<client_version> -Denforcer.skip
38+
mvn exec:java -Dexec.mainClass=com.google.cloud.bigtable.testproxy.CbtTestProxyMain
39+
```
40+
41+
## Run the test cases
42+
43+
```
44+
cd cloud-bigtable-clients-test/tests
45+
go test -v -proxy_addr=:9999
46+
```

test-proxy/pom.xml

+140
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,140 @@
1+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
2+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
3+
<modelVersion>4.0.0</modelVersion>
4+
<groupId>com.google.cloud</groupId>
5+
<artifactId>google-cloud-bigtable-test-proxy</artifactId>
6+
<version>0.0.1-SNAPSHOT</version>
7+
<packaging>jar</packaging>
8+
<name>Google Cloud Bigtable Test Proxy</name>
9+
<url>https://github.com/googleapis/java-bigtable</url>
10+
<description>Cloud Bigtable Java Client test proxy for running conformance tests.</description>
11+
12+
<parent>
13+
<artifactId>google-cloud-bigtable-parent</artifactId>
14+
<groupId>com.google.cloud</groupId>
15+
<version>2.16.1-SNAPSHOT</version><!-- {x-version-update:google-cloud-bigtable:current} -->
16+
</parent>
17+
18+
<properties>
19+
<bigtable.client.version>2.16.1-SNAPSHOT</bigtable.client.version><!-- {x-version-update:google-cloud-bigtable:current} -->
20+
</properties>
21+
22+
<dependencyManagement>
23+
<dependencies>
24+
<dependency>
25+
<groupId>com.google.cloud</groupId>
26+
<artifactId>google-cloud-bigtable-bom</artifactId>
27+
<version>${bigtable.client.version}</version>
28+
<type>pom</type>
29+
<scope>import</scope>
30+
</dependency>
31+
<dependency>
32+
<groupId>com.google.cloud</groupId>
33+
<artifactId>google-cloud-bigtable-deps-bom</artifactId>
34+
<version>${bigtable.client.version}</version>
35+
<type>pom</type>
36+
<scope>import</scope>
37+
</dependency>
38+
</dependencies>
39+
</dependencyManagement>
40+
41+
<dependencies>
42+
<dependency>
43+
<groupId>com.google.cloud</groupId>
44+
<artifactId>google-cloud-bigtable</artifactId>
45+
</dependency>
46+
<dependency>
47+
<groupId>io.grpc</groupId>
48+
<artifactId>grpc-netty</artifactId>
49+
</dependency>
50+
<dependency>
51+
<groupId>io.grpc</groupId>
52+
<artifactId>grpc-stub</artifactId>
53+
</dependency>
54+
<dependency>
55+
<groupId>com.google.protobuf</groupId>
56+
<artifactId>protobuf-java</artifactId>
57+
</dependency>
58+
</dependencies>
59+
60+
<build>
61+
<extensions>
62+
<extension>
63+
<groupId>kr.motd.maven</groupId>
64+
<artifactId>os-maven-plugin</artifactId>
65+
<version>1.6.2</version>
66+
</extension>
67+
</extensions>
68+
<plugins>
69+
<plugin>
70+
<groupId>org.xolstice.maven.plugins</groupId>
71+
<artifactId>protobuf-maven-plugin</artifactId>
72+
<version>0.6.1</version>
73+
<configuration>
74+
<protocArtifact>com.google.protobuf:protoc:3.9.0:exe:${os.detected.classifier}</protocArtifact>
75+
<pluginId>grpc-java</pluginId>
76+
<pluginArtifact>io.grpc:protoc-gen-grpc-java:1.24.0:exe:${os.detected.classifier}</pluginArtifact>
77+
</configuration>
78+
<executions>
79+
<execution>
80+
<goals>
81+
<goal>compile</goal>
82+
<goal>compile-custom</goal>
83+
</goals>
84+
</execution>
85+
</executions>
86+
</plugin>
87+
<!-- start skip publishing to maven central -->
88+
<plugin>
89+
<groupId>org.apache.maven.plugins</groupId>
90+
<artifactId>maven-deploy-plugin</artifactId>
91+
<configuration>
92+
<skip>true</skip>
93+
</configuration>
94+
</plugin>
95+
<plugin>
96+
<groupId>org.sonatype.plugins</groupId>
97+
<artifactId>nexus-staging-maven-plugin</artifactId>
98+
<configuration>
99+
<skipNexusStagingDeployMojo>true</skipNexusStagingDeployMojo>
100+
</configuration>
101+
</plugin>
102+
<plugin>
103+
<groupId>org.apache.maven.plugins</groupId>
104+
<artifactId>maven-site-plugin</artifactId>
105+
<configuration>
106+
<skipDeploy>true</skipDeploy>
107+
</configuration>
108+
</plugin>
109+
<plugin>
110+
<groupId>org.apache.maven.plugins</groupId>
111+
<artifactId>maven-source-plugin</artifactId>
112+
<configuration>
113+
<skipSource>true</skipSource>
114+
</configuration>
115+
</plugin>
116+
<plugin>
117+
<groupId>org.apache.maven.plugins</groupId>
118+
<artifactId>maven-javadoc-plugin</artifactId>
119+
<configuration>
120+
<skip>true</skip>
121+
</configuration>
122+
</plugin>
123+
<plugin>
124+
<groupId>org.apache.maven.plugins</groupId>
125+
<artifactId>maven-gpg-plugin</artifactId>
126+
<configuration>
127+
<skip>true</skip>
128+
</configuration>
129+
</plugin>
130+
<plugin>
131+
<groupId>org.codehaus.mojo</groupId>
132+
<artifactId>clirr-maven-plugin</artifactId>
133+
<configuration>
134+
<skip>true</skip>
135+
</configuration>
136+
</plugin>
137+
<!-- end skip publishing to maven central -->
138+
</plugins>
139+
</build>
140+
</project>

0 commit comments

Comments
 (0)