[gnome-software] Do not use g_test_expect_message() with structured logging
- From: Richard Hughes <rhughes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software] Do not use g_test_expect_message() with structured logging
- Date: Wed, 5 Apr 2017 08:11:10 +0000 (UTC)
commit f73296ce5103b3d4a9ab26d53f06731e92133f6c
Author: Richard Hughes <richard hughsie com>
Date: Wed Apr 5 09:00:40 2017 +0100
Do not use g_test_expect_message() with structured logging
lib/gs-app.c | 5 ++---
lib/gs-self-test.c | 2 --
2 files changed, 2 insertions(+), 5 deletions(-)
---
diff --git a/lib/gs-app.c b/lib/gs-app.c
index e642fe7..3d20b8b 100644
--- a/lib/gs-app.c
+++ b/lib/gs-app.c
@@ -929,9 +929,8 @@ gs_app_set_progress (GsApp *app, guint percentage)
if (app->progress == percentage)
return;
if (percentage > 100) {
- g_warning ("Cannot set '%u' as the progress for app '%s'. "
- "Setting the maximum allowed value instead: 100.",
- percentage, gs_app_get_unique_id_unlocked (app));
+ g_debug ("cannot set %u%% for %s, setting instead: 100%%",
+ percentage, gs_app_get_unique_id_unlocked (app));
percentage = 100;
}
app->progress = percentage;
diff --git a/lib/gs-self-test.c b/lib/gs-self-test.c
index 74d3537..ea97983 100644
--- a/lib/gs-self-test.c
+++ b/lib/gs-self-test.c
@@ -439,8 +439,6 @@ gs_app_func (void)
/* check setting the progress */
gs_app_set_progress (app, 42);
g_assert_cmpuint (gs_app_get_progress (app), ==, 42);
- g_test_expect_message (G_LOG_DOMAIN, G_LOG_LEVEL_WARNING,
- "Cannot set*as the progress for app*");
gs_app_set_progress (app, 142);
g_assert_cmpuint (gs_app_get_progress (app), ==, 100);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]