summaryrefslogtreecommitdiff
path: root/tests/cache-test.c
Commit message (Collapse)AuthorAgeFilesLines
* metrics: add support for size metricscarlosgc/metricsCarlos Garcia Campos2021-04-131-0/+12
|
* Add support for collecting metricsCarlos Garcia Campos2021-04-131-0/+110
|
* Rename soup_message_headers_free as soup_message_headers_unrefCarlos Garcia Campos2021-03-261-1/+1
| | | | | And soup_message_headers_copy as soup_message_headers_ref that is now public.
* Stop using emacs indent-tabs-modeCarlos Garcia Campos2021-03-181-1/+1
| | | | We prefer spaces now instead of tabs.
* Fix compile warningsPatrick Griffis2021-03-051-1/+1
|
* Fix some functions that weren't changed from a boolean to an enum.Robert Ancell2021-02-251-1/+1
| | | | This function was changed in 96b890dc8
* cache-test: fix session extra reference on endCarlos Garcia Campos2021-02-241-4/+2
| | | | Just iterate the main loop to ensure the message finishes.
* cache-test: Fix leakPatrick Griffis2020-11-251-3/+5
|
* Stop using soup_session_cancel_message() in testsCarlos Garcia Campos2020-11-151-16/+4
|
* Remove non-HTTP SoupStatus valuesCarlos Garcia Campos2020-11-151-10/+3
| | | | | Stop using the message status for internal or transport errors and always use GError for those.
* Replace SoupURI with GUriPatrick Griffis2020-11-141-20/+20
|
* Remove type argument from soup_test_session_new()Patrick Griffis2020-11-061-6/+6
|
* Remove properties that behave as functionspgriffis/remove-property-functionsPatrick Griffis2020-11-051-18/+14
| | | | This goes against all convention and isn't binding friendly.
* Make SoupMessage a private and final typePatrick Griffis2020-10-281-5/+5
|
* Remove property aliasesPatrick Griffis2020-10-281-6/+6
| | | | | | | | | | | This was an oddity of libsoup that no other GObject library does. The downsides are mostly that tooling doesn't expect it so its easy to not document them or not define them and developers don't expect them so they don't realize the defines are just property names or search codebases for one but miss the other. It just doesn't follow convention.
* tests: stop using SoupRequest API in testsCarlos Garcia Campos2020-10-261-18/+13
|
* Split SoupMessage into client and server partscarlosgc/split-ioCarlos Garcia Campos2020-10-191-21/+30
| | | | Add SoupServerMessage and move there all the server only functionality.
* Replace SoupDate with GDateTimePatrick Griffis2020-09-191-10/+7
|
* Remove SoupSessionAsyncPatrick Griffis2020-09-191-6/+0
|
* tests: More removal of deprecated async sessionPatrick Griffis2020-09-191-6/+8
|
* tests: plug leaks, update libsoup.suppDan Winship2015-03-021-1/+2
|
* cache: Do not unqueue messages of cached resources until finishedCarlos Garcia Campos2015-03-021-1/+15
| | | | | | | | | | We were marking the message is FINISHING right after returning the response, so that the message was unqueued while the client is still reading the input stream. This is inconsistent with normal messages and can confuse clients that connect to request-queued and request-unqueued signals to track messages. https://bugzilla.gnome.org/show_bug.cgi?id=744788
* cache: kick the message queue when a cached resource finishesCarlos Garcia Campos2015-03-021-0/+24
| | | | | | Otherwise the resource is not unqueued unless a new request is made. https://bugzilla.gnome.org/show_bug.cgi?id=744788
* Add SoupMessage::starting signalCarlos Garcia Campos2015-03-021-6/+14
| | | | | | | It's similar to the SoupSession::request-started signal, but it's also emitted for cached resources. https://bugzilla.gnome.org/show_bug.cgi?id=731153
* cache: Do not revalidate resources that haven't expired even if ↵Carlos Garcia Campos2015-02-171-1/+9
| | | | | | | | | | | | | | | | | | must-revalidate is present RFC2616 14.9.4 "When the must-revalidate directive is present in a response received by a cache, that cache MUST NOT use the entry after it becomes stale to respond to a subsequent request without first revalidating it with the origin server. (I.e., the cache MUST do an end-to-end revalidation every time, if, based solely on the origin server's Expires or max-age value, the cached response is stale.)" Update also the unit tests, since they were checking the wrong behaviour. https://bugzilla.gnome.org/show_bug.cgi?id=744468
* cache: Clean up leaked resources when loading the cacheCarlos Garcia Campos2014-12-071-0/+80
| | | | | | | | | | When soup_cache_dump() is not called for some reason, like a crash in the application, the new cached resources are not referenced by the index and then leaked in the cache directory. soup_cache_load() removes all the resources found in the cache directory and not referenced by the cached index. https://bugzilla.gnome.org/show_bug.cgi?id=667682
* tests: port old tests to new SoupServer APIs, add some new testsDan Winship2014-05-021-2/+1
|
* tests: use g_test_bug() to annotate test casesDan Winship2014-03-151-0/+4
|
* tests: remove debug_printf()s that are redundant with test namesDan Winship2014-03-151-8/+0
|
* tests: initial port to the gtestutils frameworkDan Winship2014-02-081-148/+66
| | | | | Some programs need to be split up into more tests, and the debug output is mostly not updated for the new format.
* cache-test: fix some minor things pointed out by coverityDan Winship2013-09-111-2/+2
|
* cache-test: fix race conditionDan Winship2013-08-231-9/+20
| | | | | | | The refcounting test had a race condition. Fix it by just waiting for the stream to be destroyed, rather than asserting it already has been. https://bugzilla.gnome.org/show_bug.cgi?id=698305
* soup-cache: update cached headers on revalidationsSergio Villar Senin2013-03-051-31/+130
| | | | | | | | | | | | | | SoupCache was not updating the cached headers on conditional requests. We were only doing it for revalidations started by libsoup clients. This also properly reset the values of freshness_lifetime and must_revalidate on revalidations. These two fields were keeping their original values even if the server wasn't providing such information. Finally this adds a new cache test (do_header_test) and fixes the one disabled with #ifdefs (second revalidations). https://bugzilla.gnome.org/show_bug.cgi?id=695121
* cache-test: added a new cancellation testSergio Villar Senin2013-02-181-0/+61
| | | | | | | | | | Added do_refcounting_test that checks that streams do not leak any reference when a message is cancelled just before starting to read. This test also need a new cancel flag called SOUP_TEST_REQUEST_CANCEL_AFTER_SEND_FINISH. https://bugzilla.gnome.org/show_bug.cgi?id=682527
* test-utils: Added SOUP_TEST_REQUEST_CANCEL_IMMEDIATE flagSergio Villar Senin2013-02-181-4/+9
| | | | | | | | We were assuming that if the SOUP_TEST_REQUEST_CANCEL_SOON flag was not present then we wanted an immediate cancelation. That worked but now we need to add it to support more cancellation types. https://bugzilla.gnome.org/show_bug.cgi?id=682527
* cache-test: added cancellation testsSergio Villar Senin2013-02-121-0/+125
| | | | | | | | Added cancellation tests for both fresh and under revalidation resources. These tests ensure that cancellations happen flawlessly and that any potential revalidation process is also cancelled. https://bugzilla.gnome.org/show_bug.cgi?id=692310
* test-utils: add cancellation support to soup_test_request_sendSergio Villar Senin2013-02-121-1/+1
| | | | | | | | | | | The function gets a new parametter used to enable request cancellation for both sync and async sessions. The cancellation could be performed by either using the GCancellable or by directly cancelling the SoupMessage. Also the GMainContext used to simulate sync operations with async ones will now try to execute all its pending events before quiting the main loop. https://bugzilla.gnome.org/show_bug.cgi?id=692310
* Revert the mirroring of SoupMessage API onto SoupRequestHTTP.Dan Winship2012-12-281-1/+4
| | | | | | | | | | | SoupMessage isn't being deprecated, and mirroring its API onto SoupRequestHTTP is just going to result in always having to add every new API twice. Also, it turns out to be less useful than originally expected anyway, since you end up having to cast between SoupRequest and SoupRequestHTTP frequently anyway. This reverts commit d7117329400e47d2187ed033099d921d555f8d71 and most of commit 53c270d0e2868fa5ad48ce864f10a9486b11a071.
* tests: add cache-testDan Winship2012-12-261-0/+441
Add a test of basic cache functionality (finally!) Still needs more tests...