Skip to content

Commit

Permalink
lib-index: Fix test-mail-index-transaction-update
Browse files Browse the repository at this point in the history
It was broken with TZ=Australia/ACT. Fixing it seems too troublesome, so
just use TZ=UTC during the test.
  • Loading branch information
sirainen committed Mar 16, 2017
1 parent 9e3c265 commit 35b3470
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/lib-index/test-mail-index-transaction-update.c
Expand Up @@ -627,6 +627,10 @@ static void test_mail_index_update_day_first_uid(void)

test_begin("mail index update day first uid");

/* daylight savings times were confusing these tests, so we'll now
just assume that TZ=UTC */
test_assert(timezone == 0);

hdr.messages_count = 10;
t = mail_index_transaction_new();
t->view = t_new(struct mail_index_view, 1);
Expand Down Expand Up @@ -671,6 +675,8 @@ int main(void)
test_mail_index_update_day_first_uid,
NULL
};
/* daylight saving time confuses things */
putenv("TZ=UTC");
tzset();
return test_run(test_functions);
}

0 comments on commit 35b3470

Please sign in to comment.