Bug 69715

Summary: logger: fix tests
Product: Telepathy Reporter: Guillaume Desmottes <guillaume.desmottes>
Component: loggerAssignee: Telepathy bugs list <telepathy-bugs>
Status: RESOLVED FIXED QA Contact: Telepathy bugs list <telepathy-bugs>
Severity: normal    
Priority: medium CC: guillaume.desmottes
Version: unspecified   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:
Attachments: automake: use serial-tests
test-log-manager: make sure to pass a (gint64) as timestamp
sqlite: deal with g_date_time_new_from_unix_utc() failing
tpl_log_manager_search_async: fix introspection

Description Guillaume Desmottes 2013-09-23 13:59:07 UTC
.
Comment 1 Guillaume Desmottes 2013-09-23 13:59:49 UTC
Created attachment 86370 [details] [review]
automake: use serial-tests
Comment 2 Guillaume Desmottes 2013-09-23 14:00:02 UTC
Created attachment 86371 [details] [review]
test-log-manager: make sure to pass a (gint64) as timestamp
Comment 3 Guillaume Desmottes 2013-09-23 14:00:15 UTC
Created attachment 86372 [details] [review]
sqlite: deal with g_date_time_new_from_unix_utc() failing
Comment 4 Guillaume Desmottes 2013-09-23 14:00:27 UTC
Created attachment 86373 [details] [review]
tpl_log_manager_search_async: fix introspection
Comment 5 Simon McVittie 2013-09-23 18:50:39 UTC
Comment on attachment 86370 [details] [review]
automake: use serial-tests

Review of attachment 86370 [details] [review]:
-----------------------------------------------------------------

::: configure.ac
@@ -87,4 @@
>  AC_CONFIG_SRCDIR([configure.ac])
>  AC_CONFIG_AUX_DIR(.)
>  
> -AM_INIT_AUTOMAKE(1.9 dist-bzip2 no-define no-dist-gzip tar-ustar -Wno-portability)

++
Comment 6 Simon McVittie 2013-09-23 18:51:03 UTC
Comment on attachment 86371 [details] [review]
test-log-manager: make sure to pass a (gint64) as timestamp

Review of attachment 86371 [details] [review]:
-----------------------------------------------------------------

++
Comment 7 Simon McVittie 2013-09-23 18:52:32 UTC
Comment on attachment 86372 [details] [review]
sqlite: deal with g_date_time_new_from_unix_utc() failing

Review of attachment 86372 [details] [review]:
-----------------------------------------------------------------

::: telepathy-logger/log-store-sqlite.c
@@ +329,4 @@
>    gchar *date;
>  
>    ts = g_date_time_new_from_unix_utc (tpl_event_get_timestamp (event));
> +  g_return_val_if_fail (ts != NULL, NULL);

Would it be better to return "9999-12-31" or something?

I'd be OK with declaring the answer to be "no" though.
Comment 8 Simon McVittie 2013-09-23 18:52:52 UTC
Comment on attachment 86373 [details] [review]
tpl_log_manager_search_async: fix introspection

Review of attachment 86373 [details] [review]:
-----------------------------------------------------------------

++
Comment 9 Guillaume Desmottes 2013-09-24 09:13:31 UTC
(In reply to comment #7)
> Comment on attachment 86372 [details] [review] [review]
> sqlite: deal with g_date_time_new_from_unix_utc() failing
> 
> Review of attachment 86372 [details] [review] [review]:
> -----------------------------------------------------------------
> 
> ::: telepathy-logger/log-store-sqlite.c
> @@ +329,4 @@
> >    gchar *date;
> >  
> >    ts = g_date_time_new_from_unix_utc (tpl_event_get_timestamp (event));
> > +  g_return_val_if_fail (ts != NULL, NULL);
> 
> Would it be better to return "9999-12-31" or something?
> 
> I'd be OK with declaring the answer to be "no" though.

I think that's fine. I spot this only because of the other bug I just fixed.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.