Skip to content

Conversation

@bisakhmondal
Copy link
Member

@bisakhmondal bisakhmondal commented Oct 22, 2021

What this PR does / why we need it:

  1. Creates testfile for grpc streaming proxy
  2. delete the old bash file

As we have moved from using bash to test grpc proxy to Test NGINX #5298 (comment).

Pre-submission checklist:

  • Did you explain what problem does this PR solve? Or what new features have been added?
  • Have you added corresponding test cases?
  • Have you modified the corresponding document?
  • Is this PR backward compatible? If it is not backward compatible, please discuss on the mailing list first

@bisakhmondal bisakhmondal marked this pull request as ready for review October 25, 2021 15:00
# sleep 1

./bin/apisix stop
sleep 1
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should remove this whole segment, not required anymore (Line 71 - Line 111). WDYT @spacewander?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK. Remember to put this back:

# ensure grpc server example is already started
for (( i = 0; i <= 100; i++ )); do
    if [[ "$i" -eq 100 ]]; then
        echo "failed to start grpc_server_example in time"
        exit 1
    fi
    nc -zv 127.0.0.1 50051 && break
    sleep 1
done

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done. Thanks for pointing it out.

git clone https://github.com/iresty/grpc_server_example.git grpc_server_example
cd grpc_server_example/ && mv proto/ ../build-cache/ && cd ..
./build-cache/grpc_server_example \
cd build-cache/ && wget https://golang.org/dl/go1.15.linux-amd64.tar.gz && tar -xf go1.15.linux-amd64.tar.gz
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Better to put a comment here to show why we need to download Go manually.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ack.

# install and start grpc_server_example
cd t/grpc_server_example

if [ ! "$(ls -A . )" ]; then
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Better to add a comment about why this branch is needed

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ack

# sleep 1

./bin/apisix stop
sleep 1
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK. Remember to put this back:

# ensure grpc server example is already started
for (( i = 0; i <= 100; i++ )); do
    if [[ "$i" -eq 100 ]]; then
        echo "failed to start grpc_server_example in time"
        exit 1
    fi
    nc -zv 127.0.0.1 50051 && break
    sleep 1
done

@bisakhmondal bisakhmondal force-pushed the grpc_stream_proxy_test branch from 724d217 to d779f9a Compare October 26, 2021 11:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants