From 4fe43fd321cbec8f7019c68e8b04743646ef5959 Mon Sep 17 00:00:00 2001 From: Martin Edenhofer Date: Mon, 31 Aug 2015 11:27:42 +0200 Subject: [PATCH] Improved timing for tests. --- test/unit/email_process_test.rb | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/test/unit/email_process_test.rb b/test/unit/email_process_test.rb index e8e6190f7..706ca3d25 100644 --- a/test/unit/email_process_test.rb +++ b/test/unit/email_process_test.rb @@ -2047,7 +2047,7 @@ Some Text', updated_by_id: 1, created_by_id: 1, ) - + sleep 1 email_raw_string = IO.read('test/fixtures/mail33-undelivered-mail-returned-to-sender.box') ticket_p, article_p, user_p = Channel::EmailParser.new.process( {}, email_raw_string) assert_equal(ticket.id, ticket_p.id) @@ -2134,35 +2134,45 @@ no reference " setting_orig = Setting.get('postmaster_follow_up_search_in') Setting.set('postmaster_follow_up_search_in', ['body', 'attachment', 'references']) + sleep 1 ticket_p, article_p, user_p = Channel::EmailParser.new.process( {}, email_raw_string_subject) assert_equal(ticket.id, ticket_p.id) + sleep 1 ticket_p, article_p, user_p = Channel::EmailParser.new.process( {}, email_raw_string_body) assert_equal(ticket.id, ticket_p.id) + sleep 1 ticket_p, article_p, user_p = Channel::EmailParser.new.process( {}, email_raw_string_attachment) assert_equal(ticket.id, ticket_p.id) + sleep 1 ticket_p, article_p, user_p = Channel::EmailParser.new.process( {}, email_raw_string_references1) assert_equal(ticket.id, ticket_p.id) + sleep 1 ticket_p, article_p, user_p = Channel::EmailParser.new.process( {}, email_raw_string_references2) assert_equal(ticket.id, ticket_p.id) Setting.set('postmaster_follow_up_search_in', setting_orig) + sleep 1 ticket_p, article_p, user_p = Channel::EmailParser.new.process( {}, email_raw_string_subject) assert_equal(ticket.id, ticket_p.id) + sleep 1 ticket_p, article_p, user_p = Channel::EmailParser.new.process( {}, email_raw_string_body) assert_not_equal(ticket.id, ticket_p.id) + sleep 1 ticket_p, article_p, user_p = Channel::EmailParser.new.process( {}, email_raw_string_attachment) assert_not_equal(ticket.id, ticket_p.id) + sleep 1 ticket_p, article_p, user_p = Channel::EmailParser.new.process( {}, email_raw_string_references1) assert_not_equal(ticket.id, ticket_p.id) + sleep 1 ticket_p, article_p, user_p = Channel::EmailParser.new.process( {}, email_raw_string_references2) assert_not_equal(ticket.id, ticket_p.id) end