Skip to content

Commit

Permalink
Support MySQL8
Browse files Browse the repository at this point in the history
Results seem to be returned in reverse order now, so I'm fixing the
tests for that.

See #69
  • Loading branch information
matiasgarciaisaia committed Jan 19, 2024
1 parent 3835888 commit 4767b28
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
3 changes: 2 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ version: '2.0'

services:
db:
image: mysql:5.7
image: mysql:8.0-debian
command: --default-authentication-plugin=mysql_native_password
environment:
MYSQL_ALLOW_EMPTY_PASSWORD: 'yes'
volumes:
Expand Down
2 changes: 1 addition & 1 deletion test/unit/push_qst_channel_message_job_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,8 @@ def setup
end

test "two messages no previous last id but only one confirmed" do
@msg1 = AoMessage.make :account => @channel.account, :channel => @channel, :state => 'queued', :timestamp => Time.now
@msg2 = AoMessage.make :account => @channel.account, :channel => @channel, :state => 'queued', :timestamp => Time.now + 1
@msg1 = AoMessage.make :account => @channel.account, :channel => @channel, :state => 'queued', :timestamp => Time.now

@client.expects(:get_last_id).returns(nil)
@client.expects(:put_messages).with([@msg1.to_qst, @msg2.to_qst]).returns(@msg1.guid)
Expand Down
8 changes: 4 additions & 4 deletions test/unit/telemetry/channels_by_kind_collector_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,14 @@ def setup
@end = @now
@period = InsteddTelemetry::Period.new beginning: @beginning, end: @end

Pop3Channel.make created_at: @end - 3.days
Pop3Channel.make created_at: @end - 8.days
Pop3Channel.make created_at: @end + 3.days

QstClientChannel.make created_at: @end - 1.day
QstClientChannel.make created_at: @end - 10.days
QstClientChannel.make created_at: @end - 365.days
QstClientChannel.make created_at: @end + 1.day

Pop3Channel.make created_at: @end - 3.days
Pop3Channel.make created_at: @end - 8.days
Pop3Channel.make created_at: @end + 3.days
end

test 'should collect channels grouped by kind' do
Expand Down

0 comments on commit 4767b28

Please sign in to comment.