From ab45956cbf1fc22bf7bd09bde9d1234d010a3874 Mon Sep 17 00:00:00 2001 From: Jiongxin Liu Date: Mon, 12 Dec 2022 12:16:06 -0500 Subject: [PATCH 1/4] test(fix): update the test proxy's pom file to build a shaded jar, also correct the README about building an old version --- test-proxy/README.md | 17 +++++++---------- test-proxy/pom.xml | 33 +++++++++++++++++++++++++++++++++ 2 files changed, 40 insertions(+), 10 deletions(-) diff --git a/test-proxy/README.md b/test-proxy/README.md index a97f40094e3a..ae554edc95d2 100644 --- a/test-proxy/README.md +++ b/test-proxy/README.md @@ -2,7 +2,7 @@ The CBT test proxy is intended for running confromance tests for Cloug Bigtable Java Client. -## Set up +## Set up If you have not already done so, [install golang](https://go.dev/doc/install), then clone the go test library: @@ -21,23 +21,20 @@ cd test-proxy mvn clean install ``` +To build the proxy with an older version of the client, please download the +source code [here](https://github.com/googleapis/java-bigtable/releases), +and repeat the build steps mentioned above. + Start the proxy on default port 9999 ``` -mvn exec:java -Dexec.mainClass=com.google.cloud.bigtable.testproxy.CbtTestProxyMain +java -jar target/google-cloud-bigtable-test-proxy-.jar ``` Start the proxy on a different port ``` -mvn exec:java -Dexec.mainClass=com.google.cloud.bigtable.testproxy.CbtTestProxyMain -Dport=1 -``` - -Build and start the proxy with an older version of the client - -``` -mvn clean install -Dbigtable.client.version= -Denforcer.skip -mvn exec:java -Dexec.mainClass=com.google.cloud.bigtable.testproxy.CbtTestProxyMain +java -Dport=1 -jar target/google-cloud-bigtable-test-proxy-.jar ``` ## Run the test cases diff --git a/test-proxy/pom.xml b/test-proxy/pom.xml index 579270344287..3af42ac3edbe 100644 --- a/test-proxy/pom.xml +++ b/test-proxy/pom.xml @@ -134,6 +134,39 @@ true + + org.apache.maven.plugins + maven-shade-plugin + 3.2.4 + + + package + + shade + + + + + *:* + + META-INF/*.SF + META-INF/*.DSA + META-INF/*.RSA + + + + + + + + com.google.cloud.bigtable.testproxy.CbtTestProxyMain + + + + + + + From 922bef800a80971f4e3ddfefbaef1e29b0714222 Mon Sep 17 00:00:00 2001 From: Jiongxin Liu Date: Mon, 12 Dec 2022 12:16:06 -0500 Subject: [PATCH 2/4] test(fix): update the test proxy's pom file to build a shaded jar, also correct the README about building an old version --- test-proxy/README.md | 15 ++++----------- test-proxy/pom.xml | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 36 insertions(+), 11 deletions(-) diff --git a/test-proxy/README.md b/test-proxy/README.md index a97f40094e3a..cedf608118b0 100644 --- a/test-proxy/README.md +++ b/test-proxy/README.md @@ -2,7 +2,7 @@ The CBT test proxy is intended for running confromance tests for Cloug Bigtable Java Client. -## Set up +## Set up If you have not already done so, [install golang](https://go.dev/doc/install), then clone the go test library: @@ -12,7 +12,7 @@ git clone https://github.com/googleapis/cloud-bigtable-clients-test.git ## Start test proxy -Build the proxy with the latest version of the client +Build the proxy with the latest/head version of the client ``` cd java-bigtable @@ -24,20 +24,13 @@ mvn clean install Start the proxy on default port 9999 ``` -mvn exec:java -Dexec.mainClass=com.google.cloud.bigtable.testproxy.CbtTestProxyMain +java -jar target/google-cloud-bigtable-test-proxy-.jar ``` Start the proxy on a different port ``` -mvn exec:java -Dexec.mainClass=com.google.cloud.bigtable.testproxy.CbtTestProxyMain -Dport=1 -``` - -Build and start the proxy with an older version of the client - -``` -mvn clean install -Dbigtable.client.version= -Denforcer.skip -mvn exec:java -Dexec.mainClass=com.google.cloud.bigtable.testproxy.CbtTestProxyMain +java -Dport=1 -jar target/google-cloud-bigtable-test-proxy-.jar ``` ## Run the test cases diff --git a/test-proxy/pom.xml b/test-proxy/pom.xml index 579270344287..fe289994ba26 100644 --- a/test-proxy/pom.xml +++ b/test-proxy/pom.xml @@ -134,6 +134,38 @@ true + + org.apache.maven.plugins + maven-shade-plugin + + + package + + shade + + + + + *:* + + META-INF/*.SF + META-INF/*.DSA + META-INF/*.RSA + + + + + + + + com.google.cloud.bigtable.testproxy.CbtTestProxyMain + + + + + + + From d4b449c716ecc52de8987296fc601b60ee361504 Mon Sep 17 00:00:00 2001 From: Jiongxin Liu Date: Mon, 12 Dec 2022 16:17:04 -0500 Subject: [PATCH 3/4] test(fix): revert the previous commit b6b9eb623d8505ce68ef879f6e4ac0d21e8eabcc --- test-proxy/README.md | 4 ---- 1 file changed, 4 deletions(-) diff --git a/test-proxy/README.md b/test-proxy/README.md index cb15645b02a2..cedf608118b0 100644 --- a/test-proxy/README.md +++ b/test-proxy/README.md @@ -21,10 +21,6 @@ cd test-proxy mvn clean install ``` -To build the proxy with an older version of the client, please download the -source code [here](https://github.com/googleapis/java-bigtable/releases), -and repeat the build steps mentioned above. - Start the proxy on default port 9999 ``` From d7185fe4dff4c1241305b23ca98974b7e17afdf8 Mon Sep 17 00:00:00 2001 From: Jiongxin Liu Date: Mon, 12 Dec 2022 16:21:51 -0500 Subject: [PATCH 4/4] test(fix): address the review comment about README --- test-proxy/README.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/test-proxy/README.md b/test-proxy/README.md index cedf608118b0..287c3a0f131c 100644 --- a/test-proxy/README.md +++ b/test-proxy/README.md @@ -39,3 +39,12 @@ java -Dport=1 -jar target/google-cloud-bigtable-test-proxy-.jar cd cloud-bigtable-clients-test/tests go test -v -proxy_addr=:9999 ``` + +## Test a released client + +To do so, you need to build the proxy with the released version of the client. +Please download the source code +[here](https://github.com/googleapis/java-bigtable/releases), and repeat the +above steps. + +Note that Kokoro presubmit test doesn't use this route.