File tree Expand file tree Collapse file tree 2 files changed +14
-3
lines changed
Expand file tree Collapse file tree 2 files changed +14
-3
lines changed Original file line number Diff line number Diff line change 11configured_endpoints : 105
2- openapi_spec_url : https://storage.googleapis.com/stainless-sdk-openapi-specs/datamini%2Fasktable-ed62f3146ecded3abdc0516037fc1582de7f91ed96ef29d9e36f5d92f25780c1 .yml
3- openapi_spec_hash : 6de1359e14433d1110b8ea1ebe46514a
2+ openapi_spec_url : https://storage.googleapis.com/stainless-sdk-openapi-specs/datamini%2Fasktable-7997d2aebc04c657a434b6b1114b61de06f0d873868ee376ac82f5c50d20884f .yml
3+ openapi_spec_hash : 08977f6ad1332cbeb03d95dad748f20a
44config_hash : acdf4142177ed1932c2d82372693f811
Original file line number Diff line number Diff line change @@ -21,11 +21,22 @@ echo "==> Starting mock server with URL ${URL}"
2121
2222# Run prism mock on the given spec
2323if [ " $1 " == " --daemon" ]; then
24+ # Pre-install the package so the download doesn't eat into the startup timeout
25+ npm exec --package=@stainless-api/prism-cli@5.15.0 -- prism --version
26+
2427 npm exec --package=@stainless-api/prism-cli@5.15.0 -- prism mock " $URL " & > .prism.log &
2528
26- # Wait for server to come online
29+ # Wait for server to come online (max 30s)
2730 echo -n " Waiting for server"
31+ attempts=0
2832 while ! grep -q " ✖ fatal\|Prism is listening" " .prism.log" ; do
33+ attempts=$(( attempts + 1 ))
34+ if [ " $attempts " -ge 300 ]; then
35+ echo
36+ echo " Timed out waiting for Prism server to start"
37+ cat .prism.log
38+ exit 1
39+ fi
2940 echo -n " ."
3041 sleep 0.1
3142 done
You can’t perform that action at this time.
0 commit comments