You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by sh...@apache.org on 2023/11/29 17:42:52 UTC
(trafficserver) 01/01: Fix idle wait time
This is an automated email from the ASF dual-hosted git repository.
shinrich pushed a commit to branch fix-timeout-tests
in repository https://gitbox.apache.org/repos/asf/trafficserver.git
commit 5f9285b5ea4af637482884baa03c50985cff4278
Author: Susan Hinrichs <sh...@ieee.org>
AuthorDate: Wed Nov 29 17:42:35 2023 +0000
Fix idle wait time
---
tests/gold_tests/timeout/create_request.sh | 17 ++++++++++++++++-
1 file changed, 16 insertions(+), 1 deletion(-)
diff --git a/tests/gold_tests/timeout/create_request.sh b/tests/gold_tests/timeout/create_request.sh
index 83e962dd1f..df7cdc2ccd 100755
--- a/tests/gold_tests/timeout/create_request.sh
+++ b/tests/gold_tests/timeout/create_request.sh
@@ -16,5 +16,20 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-(printf "GET / HTTP/1.1" | nc -w 11 127.0.0.1 $1)
+# Different vresions of nc have different wait options,
+# so falling back to shell
+printf "GET / HTTP/1.1" | nc 127.0.0.1 $1 &
+targetPID=$!
+count=11
+while [ $count -gt 0 ]
+do
+ sleep 1
+ output=`ps uax | grep $targetPID | grep "nc "`
+ if [ -z "$output" ] # process is gone
+ then
+ exit 0
+ fi
+ count=`expr $count - 1`
+done
+kill $targetPID