-
Notifications
You must be signed in to change notification settings - Fork 406
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
Refactor integration test to not require standards violating repeated element ID #212
Conversation
…e can't use an ID here (without violating standards anyway!)
@@ -36,6 +36,7 @@ | |||
config.active_support.deprecation = :stderr | |||
|
|||
# Variable set to be able to get faye client for test environments | |||
ENV['FULL_HOST'] = "http://localhost:9292" | |||
ENV['KANDAN_FAYE_PORT'] = "9292" unless ENV['KANDAN_FAYE_PORT'] | |||
ENV['KANDAN_FAYE_URL'] = "http://localhost:#{ENV['KANDAN_FAYE_PORT']}" unless ENV['KANDAN_FAYE_URL'] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why KANDAN_FAYE_URL vs KANDAN_HOST? I don't think that variable name is very descriptive of the actual value of the variable since it is not faye specific
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm... My understanding was that it is Faye specific though! Where is it used for anything other than Faye?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is only used there now but may be used in other places later and since the variable value is not really faye specific it may be confusing in the future. No big deal anyways. 😄
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In which case, I'd suggest that we rename it when/if we use it elsewhere. 😄
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
It looks like travis build failed https://travis-ci.org/kandanapp/kandan/builds/5482464 |
Any idea why this failed? It passes the test on my machine and it passes on #213. I cant figure out how to restart the job on Travis. |
https://travis-ci.org/kandanapp/kandan/builds/5482464 Ruby 2.0 failed. |
I don't think this is Ruby 2.0 specific. There's some kind of race condition in the integration test. This is what my colleagues and I refer to as an 'FFBT' or F***ing Flaky Browser Test. I'll see if I can make it more reliable, but it passes fine on my machine under Ruby 2.0.0 too. |
I will merge this and we can deal with the racing condition on a separate PR. Ok @mjtko ? |
Let's see if that commit solves it. I think it should do, but it's difficult to tell outside of the Travis environment as everything passes on my machine anyway! |
Looks like that's done it - or at least it passed that time around. Hopefully that's fixed the FFBT. 😉 |
Refactor integration test to not require standards violating repeated element ID
Ohhhh yeah 😄 |
Refactor integration test to not require standards violating repeated element ID
The chatbox template can't really contain an ID for the textarea, as it is rendered once per channel. This PR removes the need to give it an ID just for the sake of the test.
Additionally I found I had to refactor the port on which Faye is set up to listen during tests as my system already has 9292 in use.