You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I notice we are manually choosing ports with: var portNumber = Math.floor((Math.random() * 999) + 8001);
This will presumably results in flakey tests (although not terribly flakey as we have a 1000 values we randomly choose between) ? Shouldn't we instead be asking the OS to choose a port for us (by giving port number 0, and then looking up the port that was chosen for us)?
Also: aren't our tcp-socket tests supposed to be in freedom so that we run the same tests for all platforms? (nothing about these tests seems terribly firefox specific).
Thoughts?
The text was updated successfully, but these errors were encountered:
The ones here were added as platform-specific unit tests as we were building this provider iirc, the specific implementation has clientSocket and serverSocket classes, and these tests provided some minimal interaction that can be used to get at those classes individually without debugging through and reasoning about the freedom calls.
On first glance these look to largely be duplicate to the platform-level tests, but I don't see much harm in keeping them. Do you notice areas here that test cases we don't have at the platform level and should refactor there?
I don't think we've seen these tests to be particularly unstable, so I don't see the random thing as something that needs immediate attention, maybe you have?
I don't think it needs immediate attention. Was just noticing it looked a little funny and thought it would be wise to have a placeholder. Probably worth adding to the header that these tests are really for debugging and demonstrating how to write platform-specific tests. I think it's a good idea to have them as they work as a useful demonstration and will probably help people debugging.
at: https://github.com/freedomjs/freedom-for-firefox/blob/master/spec/core.tcpsocket.unit.spec.js#L8
I notice we are manually choosing ports with:
var portNumber = Math.floor((Math.random() * 999) + 8001);
This will presumably results in flakey tests (although not terribly flakey as we have a 1000 values we randomly choose between) ? Shouldn't we instead be asking the OS to choose a port for us (by giving port number 0, and then looking up the port that was chosen for us)?
Also: aren't our tcp-socket tests supposed to be in freedom so that we run the same tests for all platforms? (nothing about these tests seems terribly firefox specific).
Thoughts?
The text was updated successfully, but these errors were encountered: