As suggested by Anupama, deflake the test by only allowing beaconing
when explitly requested by http request from tests.
Html with beacons in it will bypass the proxy cache.
- Fix a mistake I made in https://github.com/pagespeed/ngx_pagespeed/pull/653
This is the primary reason the test starts failing, the base fetch
handled `kPreserveOnlyCacheControl` in the wrong way.
- Use `ps_set_cache_control` when copying a Cache-Control header
to nginx, as `r->headers_out.cache_control` is where modules running
after us might expect it
- Exclude a few more lines from curl's verbose output in the keep-
alive tests that I came accross when testing on ubuntu 13.10
Desktop.
Note that this does not deflake the downstream cache test yet, I will
look at that in a follow-up.
There aren't actually any changes required from r3924 to r3934 but the admin
work from previous versions wasn't completely ported before.
This change:
* adds support for /pagespeed_admin and /pagespeed_global_admin
* removes NgxPagespeedConsoleAsyncFetch using NgxBaseFetch instead
* adds options StatisticsPath, GlobalStatisticsPath, ConsolePath,
MessagesPath, AdminPath, and GlobalAdminPath which allow site owners to
control what path these are served under
* changes /ngx_pagespeed_statistics etc from default-on to default-off,
requiring explicit path configuration to function
* does not fix the problem where trunk-tracking fails tests on 1.5 post #653
- Make kPreserveOnlyCacheControl do what it says on the tin
- Serve pagespeed resources with the response headers computed
by PSOL regardless of whether downstream caching is configured.
Fixes https://github.com/pagespeed/ngx_pagespeed/issues/652
* port EnrollExperiment tests.
* tricky changes to get gzip+ipro working properly.
* reduce code duplication by calling copy_response_headers_from_ngx instead
of reimplementing it.
* port Vary: Accept test changes.
The big change here is Vary: headers, which are no longer being stripped from the pagespeed response. Take a look; it might be we want to be smart about merging these headers with the original request's Vary: headers.
* r3772 changed the format of unauthorized resource inlining config
* r3776 changed query param handling, but due to Jud's nice work in
#616 needed no changes.
* r3780 huibao's refactoring lets us remove some duplicate code
* r3783 changes header passing with ipro
* Also cleaned up error messages for unknown options.
Updated global_only options to include the correct APACHE_CONFIG_OPTIONX directives.
Removed repeated tests for prioritize_critical_css basic functionality.
Added new tests, mostly downstream caching tests and related pagespeed.conf updates. Also added missing pagespeed.conf updates for downstream caching.
Added support for checking option scope.
Squash-merge of Jan's #608 and Otto's #611.
* r3726:
* Updated closure compiler flags for static JS files.
* r3729:
* Centralize parsing of FetchHttps in SystemRewriteOptions so ngx_pagespeed
can get it too.
* To keep the helpful error_message from SerfUrlAsyncFetcher, wire it through
RewriteOptions as a new-fangled error_detail.
* r3735:
* Follow-up changes for downstream caching integration with beaconing
dependent filters: If a downstream cache rebeaconing key is configured, we
should instrument the page only if the key present in the PS-ShouldBeacon
header matches the one in the configuration. This allows us to send no-cache
headers for anything that carries the right beaconing key, and continue to
send out the original cache control headers in other cases where downstream
caching is enabled.
* Native fetcher: fortify handling of content length (and absense).
* Native fetcher: fail when the stream terminates before having
completely parsed the headers.
* Tests: Rename `test_filter` -> `start_test` in ngx_system_test.sh for
a test.
* Tests: Move blockingrewrite key to the http {} block.
* Tests: Update localhost -> 127.0.0.1. The native fetcher uses
dns to resolve, and won't be able to retreive an ip for
localhost.
* Tests: Allow outstanding proxy fetches some time to finish
when running under valgrind, before terminating nginx.
* Valgrind: Add suppressions to make testing a release build pass.
This pull update was extra work because the valgrind and native fetcher flows
had rotted a bit. We need to make sure to test them with every update.
Includes minor additions to test only.
Trunk tracking updates to sync to PSOl r3677.
Trunk tracking update to sync to PSOL r3677
Includes minor additions to test only.
It doesn't make sense to fetch_until the uncombined URL and then
grep for combined one: you might just get entirely unoptimized
output and fail the test. Instead wait for the combining to happen,
and make sure it combined the right # of things.
This makes nginx run in the background under valgrind,
with both a master and a child process.
Valgrind errors will be redirected to `valgrind.log`.
When `USE_VALGRIND` is set, all system tests will be run under valgrind,
and at the end a new test is appended which ensures no valgrind errors
where encountered.
It is also worth noting that:
- There is a new file, `valgrind.sup`, which contains a few suppressions.
- Some tests behave flakey under valgrind. For now these are appended
to the expected failures (when under valgrind only).
- 'Possibly lost' errors are all suppressed to get the amount of false
positives manageable.
The shared circular buffer wasn't hooked up fully, which meant loading
/ngx_pagespeed_messages didn't work. This fixes that and adds a test.
I also noticed while adding this that the 'Handling of large files' test
wasn't set up properly, so I converted that to use start_test.
Fixing that exposed another bug where the 'Handling of large files' test
was actually failing but being marked as an expected failure by being
grouped in with the test above. Adding `pagespeed MaxHtmlParseBytes 5000`
to the appropriate location made it test what it was supposed to be testing
again, and the underlying feature wasn't broken.
Changes:
* r3585: With downstream caching, don't touch `Cache-Control` headers.
* No longer require `Modify Caching Headers off`.
* Change from `modify_caching_headers` as a boolean to a three valued enum
`PreserveCachingHeaders`.
* r3596: Make tests less flaky.
* Changes WGET_DUMP to write to WGET_DIR instead of OUTDIR.
* r3597: Remove now-redundant system tests.
* Some system tests were moved into `automatic/system_test.sh` which means we
can remove our forks.
* r3598: Enable the shared memory metadata cache by default.
* The code change just worked and needed no changes, but it also added
substantial tests, which needed some porting.
* Deflake the `scrape stats` test by moving it before config reloading.
The keepalive tests were occasionally bumping up against
the 1s timeout we had set for curl, but a 1s 99.9% tail
latency is a little agressive. Drop it to 2s to make the
tests less flaky.
What we really need is a proper load testing setup, so
the keepalive test isn't doing double-duty.