Repository navigation
Conversation
…eeping Client: js,ts The test task in lib/ts and lib/js starts the Node test servers asynchronously and then gave them one fixed second before headless Chrome loaded the first page. On a slow CI runner that is not always enough, and lib-ts failed with net::ERR_CONNECTION_REFUSED at http://localhost:8089/test.html. The wait task now tries to connect to each server port every 100 ms and continues once all of them accept connections. A server that is still not listening after 30 seconds fails the task with a message naming its port, instead of surfacing as a refused connection in the browser test. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The browser tests in
lib/tsandlib/jsstart their Node test servers as async grunt tasks and then gave them one fixed second (thewaittask) before headless Chrome loaded the first page. On a slow runner that is not always enough.lib-tsfailed withnet::ERR_CONNECTION_REFUSED at http://localhost:8089/test.htmlon master (dc83a92) and on #3753. Both times the server had not yet printed its "running on port" line, which normally appears about 0.3 s after the spawn.waitnow tries to connect to each server port every 100 ms and continues once all of them accept connections. The ports are 8089 in lib/ts and 8088 to 8091 in lib/js. A server that is still not listening after 30 seconds fails the task withNothing is listening on port N after 30 secondsinstead of surfacing as a refused connection in the browser. In the normal case the wait is shorter than the old second.Verified in the
thrift:jammyimage. The compiler was built from this branch, and the image's Node is 20.20 (CI runs Node 22).gruntrun passes in both directories. In lib/ts that is 25 + 1 tests. In lib/js it is all eleven QUnit pages, followed by concat, uglify and jsdoc. jshint reports both Gruntfiles clean, and both passprettier --check.waitreproduces the CI failure: lib/ts after 1.9 s, and lib/js on port 8089, or ontest-es6.htmlwhen the 8088 server is the late one. The newwaitholds until the late server listens. The lib/ts run then passes in 4.8 s. The lib/js runs used three pages, one each on 8089, 8091 and 8088, and they pass in 5.2 s.waitin lib/ts fails after 30.5 s with the message above, and grunt exits with 3. The lib/js copy is the same code with a longer port list.Not touched here:
lib/nodejs/test/testAll.shandlib/nodets/test/testAll.shalso start a server in the background and sleep a fixed time (0.1 s and 1 s) before starting the client. I haven't seen either fail.JIRA: THRIFT-6435
🤖 Generated with Claude Code