Skip to content

Commit 61707ca

Browse files
committed
remove new tests from this PR
1 parent d0768d3 commit 61707ca

File tree

9 files changed

+15
-318
lines changed

9 files changed

+15
-318
lines changed

.cross_sync/README.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,6 @@ Generation can be initiated using `nox -s generate_sync`
6666
from the root of the project. This will find all classes with the `__CROSS_SYNC_OUTPUT__ = "path/to/output"`
6767
annotation, and generate a sync version of classes marked with `@CrossSync.convert_sync` at the output path.
6868

69-
There is a unit test at `tests/unit/data/test_sync_up_to_date.py` that verifies that the generated code is up to date
70-
7169
## Architecture
7270

7371
CrossSync is made up of two parts:

.github/workflows/conformance.yaml

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,7 @@ jobs:
2626
matrix:
2727
test-version: [ "v0.0.2" ]
2828
py-version: [ 3.8 ]
29-
client-type: [ "async", "sync", "legacy" ]
30-
include:
31-
- client-type: "sync"
32-
# sync client does not support concurrent streams
33-
test_args: "-skip _Generic_MultiStream"
34-
- client-type: "legacy"
35-
# legacy client is synchtonous and does not support concurrent streams
36-
# legacy client does not expose mutate_row. Disable those tests
37-
test_args: "-skip _Generic_MultiStream -skip TestMutateRow_"
29+
client-type: [ "async", "legacy" ]
3830
fail-fast: false
3931
name: "${{ matrix.client-type }} client / python ${{ matrix.py-version }} / test tag ${{ matrix.test-version }}"
4032
steps:
@@ -61,6 +53,4 @@ jobs:
6153
env:
6254
CLIENT_TYPE: ${{ matrix.client-type }}
6355
PYTHONUNBUFFERED: 1
64-
TEST_ARGS: ${{ matrix.test_args }}
65-
PROXY_PORT: 9999
6656

.kokoro/conformance.sh

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,16 @@ set -eo pipefail
1919
## cd to the parent directory, i.e. the root of the git repo
2020
cd $(dirname $0)/..
2121

22+
PROXY_ARGS=""
23+
TEST_ARGS=""
24+
if [[ "${CLIENT_TYPE^^}" == "LEGACY" ]]; then
25+
echo "Using legacy client"
26+
# legacy client does not expose mutate_row. Disable those tests
27+
TEST_ARGS="-skip TestMutateRow_"
28+
fi
29+
2230
# Build and start the proxy in a separate process
31+
PROXY_PORT=9999
2332
pushd test_proxy
2433
nohup python test_proxy.py --port $PROXY_PORT --client_type=$CLIENT_TYPE &
2534
proxyPID=$!
@@ -33,7 +42,6 @@ function cleanup() {
3342
trap cleanup EXIT
3443

3544
# Run the conformance test
36-
echo "running tests with args: $TEST_ARGS"
3745
pushd cloud-bigtable-clients-test/tests
3846
eval "go test -v -proxy_addr=:$PROXY_PORT $TEST_ARGS"
3947
RETURN_CODE=$?

noxfile.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,7 @@ def system_emulated(session):
298298

299299

300300
@nox.session(python=SYSTEM_TEST_PYTHON_VERSIONS)
301-
@nox.parametrize("client_type", ["async", "sync", "legacy"])
301+
@nox.parametrize("client_type", ["async"])
302302
def conformance(session, client_type):
303303
# install dependencies
304304
constraints_path = str(

test_proxy/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ python test_proxy.py --port 8080
3131
```
3232

3333
By default, the test_proxy targets the async client. You can change this by passing in the `--client_type` flag.
34-
Valid options are `async`, `sync`, and `legacy`.
34+
Valid options are `async`, and `legacy`.
3535

3636
```
3737
python test_proxy.py --client_type=legacy

test_proxy/handlers/client_handler_data_sync_autogen.py

Lines changed: 0 additions & 185 deletions
This file was deleted.

test_proxy/run_tests.sh

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ fi
2727
SCRIPT_DIR=$(realpath $(dirname "$0"))
2828
cd $SCRIPT_DIR
2929

30-
export PROXY_SERVER_PORT=$(shuf -i 50000-60000 -n 1)
30+
export PROXY_SERVER_PORT=50055
3131

3232
# download test suite
3333
if [ ! -d "cloud-bigtable-clients-test" ]; then
@@ -43,19 +43,7 @@ function finish {
4343
}
4444
trap finish EXIT
4545

46-
if [[ $CLIENT_TYPE == "legacy" ]]; then
47-
echo "Using legacy client"
48-
# legacy client does not expose mutate_row. Disable those tests
49-
TEST_ARGS="-skip TestMutateRow_"
50-
fi
51-
52-
if [[ $CLIENT_TYPE != "async" ]]; then
53-
echo "Using legacy client"
54-
# sync and legacy client do not support concurrent streams
55-
TEST_ARGS="$TEST_ARGS -skip _Generic_MultiStream "
56-
fi
57-
5846
# run tests
5947
pushd cloud-bigtable-clients-test/tests
6048
echo "Running with $TEST_ARGS"
61-
go test -v -proxy_addr=:$PROXY_SERVER_PORT $TEST_ARGS
49+
go test -v -proxy_addr=:$PROXY_SERVER_PORT

test_proxy/test_proxy.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -114,9 +114,6 @@ def format_dict(input_obj):
114114
if client_type == "legacy":
115115
import client_handler_legacy
116116
client = client_handler_legacy.LegacyTestProxyClientHandler(**json_data)
117-
elif client_type == "sync":
118-
import client_handler_data_sync_autogen
119-
client = client_handler_data_sync_autogen.TestProxyClientHandler(**json_data)
120117
else:
121118
client = client_handler_data_async.TestProxyClientHandlerAsync(**json_data)
122119
client_map[client_id] = client
@@ -153,7 +150,7 @@ def client_handler_process(request_q, queue_pool, client_type="async"):
153150

154151
p = argparse.ArgumentParser()
155152
p.add_argument("--port", dest='port', default="50055")
156-
p.add_argument("--client_type", dest='client_type', default="async", choices=["async", "sync", "legacy"])
153+
p.add_argument("--client_type", dest='client_type', default="async", choices=["async", "legacy"])
157154

158155
if __name__ == "__main__":
159156
port = p.parse_args().port

0 commit comments

Comments
 (0)