Skip to content

Remove test sleeps#20

Closed
deBhal wants to merge 3 commits intomasterfrom
remove-test-sleeps
Closed

Remove test sleeps#20
deBhal wants to merge 3 commits intomasterfrom
remove-test-sleeps

Conversation

@deBhal
Copy link
Copy Markdown
Contributor

@deBhal deBhal commented Jul 7, 2020

This PR is a followup to #17 to remove the need for sleeps.

It turns out that this only reduces the run time by a couple of seconds (~15 -> ~13) for these tests, so not a huge priority, but it should still make them more reliable.

@deBhal
Copy link
Copy Markdown
Contributor Author

deBhal commented Jul 13, 2020

Reopening - I closed the wrong PR by mistake

@deBhal deBhal reopened this Jul 14, 2020
@simison
Copy link
Copy Markdown
Member

simison commented Aug 7, 2020

How come this is adding new files instead of modifying the test files? Does this need rebase?

deBhal pushed a commit that referenced this pull request Mar 17, 2021
deBhal pushed a commit that referenced this pull request Mar 17, 2021
deBhal pushed a commit that referenced this pull request Mar 18, 2021
deBhal added a commit that referenced this pull request Mar 23, 2021
* Attempt to run mshots in a local development environment via Docker

* memcache_connect() is part of the memcache extension, not memcached (yes, this is confusing)

* Add a docker-compose file, and launch a memcached server with it

* some Dockerfile comments

* add the GD extension

* Try/run mshots from local docker env local edit (#26)

* Docker: Add docker volume so that you can edit the files locally

* Fix memcache

This part is untesed in production. I am not sure what port is used there.

* Specify compatible version of memcache

memcache 8.0 requires php 8.x, so we need to use a version compatible
with our php7.4
( https://pecl.php.net/package/memcache )

* add .dockerignore

* typo

* Share dev local dev filesystem with container

* Add MSHOTS_MEMCACHE_HOST environment variable to control memcache server inside container

* update package-lock.json

* build container successfully if the requested user already exists

* Support "simple" docker container alongside shared local filesystem version using `npm run config:dev` command

* Add note about replacement mshots_ctl.sh stop

* Add docker image prune to troubleshooting

* separate concerns better in package.json scripts

* Remove docker-compose.yml from git so it doesn't show up in git diffs

* fix npm start script

* Enable chromium sandbox outside a container

* remove unnecessary directory limitation

Co-authored-by: Julian de Bhal <julian.debhal@automattic.com>

* add generated docker-compose.yml to .gitignore

* Move changable data down the Dockerfile to enable more caching

* Add note about output to README

* Improve consistency in `npm run config:*`

* add npm run restart

* add a couple more start/stop npm scripts

* Add phpunit tests

* Add screen dimensions unit test

* Support screenWidth and screenHeight params

* Match viewport limits with screen limits

* Give GitHub actions more time to screenshot

* Minor cleanup

* Only add viewport params when needed

* whitespace

* Cap length at clientHeight for new requests

* remove deconstructing assignment because it hangs in the container

* Add maximum screen size and increase thumb limit to that

* Use document.documentElement.scrollHeight & width instead of body.clientHeight and width

https://stackoverflow.com/questions/21064101/understanding-offsetwidth-clientwidth-scrollwidth-and-height-respectively

* fix variable names (clientX -> documentX)

* Cherry pick async code from PR #20

* Add note about docker permissions to mount directory

* Add "Mounts denied" to troubleshooting

* Fix mention of output directory

* Add a note about expected mShots redirect to default image

* add vim to the image for convenience

* Apache: AllowEncodedSlashes On

* Reduce workers to 2 in dev setup

* Return http response code 200

* Fix dev-override typo

* rename env variable WORKERS to MSHOTS_WORKERS

Co-authored-by: Andrew Serong <andrewserong@users.noreply.github.com>
Co-authored-by: Yoav Farhi <yoav@farhi.org>
Co-authored-by: Enej Bajgoric <enej.bajgoric@automattic.com>
Co-authored-by: Omar Alshaker <omar@omaralshaker.com>
@deBhal
Copy link
Copy Markdown
Contributor Author

deBhal commented Mar 23, 2021

Closing: This PR was included in #31

@deBhal deBhal closed this Mar 23, 2021
@deBhal deBhal deleted the remove-test-sleeps branch March 23, 2021 23:39
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.

3 participants