Skip to content

chore: fix flaky SQL Lab test with .focus().blur()#8215

Closed
mistercrunch wants to merge 2 commits intoapache:masterfrom
mistercrunch:try2_flaky_cypress
Closed

chore: fix flaky SQL Lab test with .focus().blur()#8215
mistercrunch wants to merge 2 commits intoapache:masterfrom
mistercrunch:try2_flaky_cypress

Conversation

@mistercrunch
Copy link
Copy Markdown
Member

@mistercrunch mistercrunch commented Sep 11, 2019

CATEGORY

Choose one

  • Bug Fix
  • Enhancement (new features, refinement)
  • Refactor
  • Add tests
  • Build / Development Environment
  • Documentation

SUMMARY

Second attempt at fixing the flaky cypress SQL Lab test. My intuition is that .focus().blur() is needed to insure that the store gets updated. With redux getting save to local storage onChange, it takes some millisecs to save that payload, so we prevent updating the store as it makes typing SQL laggy, and only commit to the store on blur.

Guessing there's a timing issue where blur may not occur in time, so trying to be explicit about it. For reference, other tests were doing this more explicitly before, so extending the approach to all tests touching Ace editor.

🤞 🤞 🤞

@dpgaspar

@dpgaspar
Copy link
Copy Markdown
Member

Great! and looks good on travis, let's hope it works

@etr2460
Copy link
Copy Markdown
Member

etr2460 commented Sep 20, 2019

I think the problem here is that the select all on the textbox is failing. The travis logs show running a query like: SELECT * FROM WHERSELECT ds, gender, name, num FROM main.birth_names LIMIT 3, so it seems like we're only backspacing a single character from the default query text, then adding the new query

@stale
Copy link
Copy Markdown

stale bot commented Nov 19, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. For admin, please label this issue .pinned to prevent stale bot from closing the issue.

@stale stale bot added the inactive Inactive for >= 30 days label Nov 19, 2019
@stale stale bot closed this Nov 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

inactive Inactive for >= 30 days size/S

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants