Skip to content
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

Add an echo server for testing #35

Closed
wants to merge 2 commits into from
Closed

Conversation

jiridanek
Copy link

This extends my previous pull requests with an echo server. AFAIK package:test testrunner does not contain an echo server and this is my proposal what to do about it.

@nex3
Copy link
Member

nex3 commented Jan 13, 2016

I'm going to review these in reverse order, because the echo server is the main thing blocking the move to the test package.

The tricky thing here is that we need the echo server in HTML tests, and those tests (being confined to the browser) have no way of spinning up such a server. As far as I can tell, the only way to solve this will be to write a plugin for the test package that starts such a server, but that's blocked on dart-lang/test#109. If you can come up with a way around that restriction, though, I'm all ears.

@jiridanek
Copy link
Author

What I am doing is starting the echo server manually before running pub test. I am setting a CORS header so that the website can access it, even though it is on a different origin (different port).

I am not sure if running two commands instead of one is a problem. It should be possible to do a script to automate that, if you think it is a problem. Regarding the CORS thing, the main problem is IMO to decide on a port number that is guaranteed to be unoccupied. I picked 395 with a random number generator and added 8 to it to make it > 1024.

@nex3
Copy link
Member

nex3 commented Jan 13, 2016

We really need the tests to be able to run automatically on the bots. I think it's probably best to just leave this un-upgraded until we can add an echo server properly.

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