How to handle applications with separate read/write MySQL Servers

11 views
Skip to first unread message

Kyle Gato

unread,
Nov 3, 2014, 7:40:10 PM11/3/14
to seleniu...@googlegroups.com
Hi Selenium Users & Team,

I have an interesting situation that can be broken down the following way.

Test: Testing if a file upload works

1) System generates a unique token authorizing user to upload files
2) User/test starts upload and upload fails because the token has not yet replicated to the slave, so the app denies the upload. This is likely nano/milli seconds.

Our MySQL servers are heavily tuned and tweaked, and this is a dev environment so load is extremely low. 

We can't reproduce the issue manually, so obviously it's due to the fact that the testing "robots" can move forward much faster than any human has the ability to.

Does anyone have any recommendations as to how I should be testing my app seeing as reads go to a MySQL slave and writes go to a MySQL master? Is my only choice to send all reads and writes to the master? That would not mimic my production setup so I'm hesitant to go that route.

I feel like the obvious possible solution would be to have the test sleep for a few seconds before continuing onto the upload action.

Your advice is greatly appreciated.

Thanks!

Kyle

PeterJeffreyGale

unread,
Nov 4, 2014, 2:39:41 AM11/4/14
to seleniu...@googlegroups.com
What is the Selenium issue involved here?

Krishnan Mahadevan

unread,
Nov 4, 2014, 3:35:05 AM11/4/14
to Selenium Users
Kyle,

If you just need to ensure that the token generated by the system percolates across your servers, then why not start off with a hard coded sleep for x Units of time before starting off the upload action ?

The other way to do this would be to have your test poll the backend systems to ascertain that the token is present before it moves forward with the upload.

Would that be viable here ?

Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ http://wakened-cognition.blogspot.com/
My Technical Scribbings @ http://rationaleemotions.wordpress.com/

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-user...@googlegroups.com.
To post to this group, send email to seleniu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/875e86a6-b77d-4276-ba67-0cfd32804b57%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages