Skip to content

Increase nrepl mock server conn timeout period for recently introduced sibling tests #3296

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 20, 2022

Conversation

ikappaki
Copy link
Contributor

Hi,

can you please review follow up PR to #3275 to address a spurious failure currently seen on master with one of the newly introduced sibling regression tests:

========================================
cider-connect-sibling-cljs sets nrepl client local vars correctly for a custom cljs REPL type project

Traceback (most recent call last):
  cider-connect-sibling-cljs((:cljs-repl-type native-cljs) #<buffer *nrepl-server ~/project:localhost*>)
  cider--gather-connect-params(nil #<buffer *nrepl-server ~/project:localhost*>)
  error("This is not a REPL or SERVER buffer; is there an active REPL?")
error: (error "This is not a REPL or SERVER buffer; is there an active REPL?")

There was a call to wait for the mock server process to wait for 2 seconds for the process to start up, but this seems to be borderline low for ms-windows runners, so it is now increased to 5 secs.

I've also replaced the polling function in the nrepl tests with a copy from the one from integration tests, which also throws an error if the condition is not met (rather than silently continuing).

Thanks


Before submitting the PR make sure the following things have been done (and denote this
by checking the relevant checkboxes):

  • The commits are consistent with our contribution guidelines
  • You've added tests (if possible) to cover your change(s)
  • All tests are passing (eldev test)
  • All code passes the linter (eldev lint) which is based on elisp-lint and includes
  • You've updated the changelog (if adding/changing user-visible functionality)
  • You've updated the user manual (if adding/changing user-visible functionality)

Thanks!

The `nrepl-tests-poll-until` poller is a copy from the one found in
integration utils and replaces `nrepl-tests-sleep-until`.
@bbatsov bbatsov merged commit 372eeab into clojure-emacs:master Dec 20, 2022
@bbatsov
Copy link
Member

bbatsov commented Dec 20, 2022

Looks good! Thanks!

@bbatsov
Copy link
Member

bbatsov commented Dec 20, 2022

@ikappaki I see some weird errors in the tests right now:

E.g. https://app.circleci.com/pipelines/github/clojure-emacs/cider/1432/workflows/d556f686-3736-4b23-8150-07578bef141a/jobs/6934

cider-connect-sibling-cljs sets nrepl client local vars correctly for a custom cljs REPL type project

Traceback (most recent call last):
  cider-connect-sibling-cljs((:cljs-repl-type native-cljs) #<buffer *nrepl-server ~/project:localhost*<2>>)
  cider-nrepl-connect((:cljs-repl-type native-cljs :host "localhost" :port 37791 :project-dir "/root/project/" :server #<process nrepl-server> :server-command "\"emacs\" -Q --batch --eval \"(progn  (setf package-user-dir       \\\"/root/project/.eldev/26.3/packages\\\"       load-path              user-emacs-directory       \\\"/root/project/.eldev/26.3/emacs-dir/\\\"  ) (package-initialize))\" -l test/nrepl-server-mock.el -f nrepl-server-mock-start" :cider-repl-cljs-upgrade-pending nil :session-name nil :repl-type cljs))
  nrepl-start-client-process("localhost" 37791 #<process nrepl-server> #[257 "\301\300!\207" [(:cljs-repl-type native-cljs :host "localhost" :port 37791 :project-dir "/root/project/" :server #<process nrepl-server> :server-command "\"emacs\" -Q --batch --eval \"(progn  (setf package-user-dir       \\\"/root/project/.eldev/26.3/packages\\\"       load-path         (package-initialize))\" -l test/nrepl-server-mock.el -f nrepl-server-mock-start" :cider-repl-cljs-upgrade-pending nil :session-name nil :repl-type cljs))
  y-or-n-p("A dead REPL *cider-repl ~/project:localhost:45251(cljs)* exists.  Reuse? ")
  read-string("A dead REPL *cider-repl ~/project:localhost:45251(cljs)* exists.  Reuse? (y or n) ")
error: (error "Error reading from stdin")```

Is this some flakiness again? 

@ikappaki
Copy link
Contributor Author

(should be addressed with #3297)

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.

2 participants