Skip to content
代码片段 群组 项目
未验证 提交 71cca53f 编辑于 作者: Harsimar Sandhu's avatar Harsimar Sandhu 提交者: GitLab
浏览文件

Merge branch 'ah-fix-flaky-ch-tests-2' into 'master'

No related branches found
No related tags found
无相关合并请求
...@@ -10,7 +10,7 @@ class EventSyncStrategy < BaseSyncStrategy ...@@ -10,7 +10,7 @@ class EventSyncStrategy < BaseSyncStrategy
CASE CASE
WHEN project_id IS NOT NULL THEN (SELECT array_to_string(traversal_ids, '/') || '/' FROM namespaces WHERE id = (SELECT project_namespace_id FROM projects WHERE id = events.project_id LIMIT 1) LIMIT 1) WHEN project_id IS NOT NULL THEN (SELECT array_to_string(traversal_ids, '/') || '/' FROM namespaces WHERE id = (SELECT project_namespace_id FROM projects WHERE id = events.project_id LIMIT 1) LIMIT 1)
WHEN group_id IS NOT NULL THEN (SELECT array_to_string(traversal_ids, '/') || '/' FROM namespaces WHERE id = events.group_id LIMIT 1) WHEN group_id IS NOT NULL THEN (SELECT array_to_string(traversal_ids, '/') || '/' FROM namespaces WHERE id = events.group_id LIMIT 1)
ELSE '' ELSE '0/'
END END
) AS path ) AS path
SQL SQL
......
...@@ -52,7 +52,7 @@ def format_row(event) ...@@ -52,7 +52,7 @@ def format_row(event)
describe 'RSpec hooks' do describe 'RSpec hooks' do
it 'ensures that tables are empty' do it 'ensures that tables are empty' do
results = ClickHouse::Client.select('SELECT * FROM FINAL events', :main) results = ClickHouse::Client.select('SELECT * FROM events FINAL', :main)
expect(results).to be_empty expect(results).to be_empty
end end
......
...@@ -64,7 +64,7 @@ def run_service(new_state = state) ...@@ -64,7 +64,7 @@ def run_service(new_state = state)
SQL SQL
table_query = <<~SQL table_query = <<~SQL
SELECT view_definition FROM information_schema.tables SELECT table_name FROM information_schema.tables
WHERE table_name = 'tmp_contributions' AND WHERE table_name = 'tmp_contributions' AND
table_schema = '#{connection.database_name}' table_schema = '#{connection.database_name}'
SQL SQL
......
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
expected_records = [ expected_records = [
hash_including('id' => project_event2.id, 'path' => "#{group.id}/#{project.project_namespace.id}/", hash_including('id' => project_event2.id, 'path' => "#{group.id}/#{project.project_namespace.id}/",
'target_type' => 'Issue'), 'target_type' => 'Issue'),
hash_including('id' => event_without_parent.id, 'path' => '', 'target_type' => ''), hash_including('id' => event_without_parent.id, 'path' => '0/', 'target_type' => ''),
hash_including('id' => group_event.id, 'path' => "#{group.id}/", 'target_type' => ''), hash_including('id' => group_event.id, 'path' => "#{group.id}/", 'target_type' => ''),
hash_including('id' => project_event1.id, 'path' => "#{group.id}/#{project.project_namespace.id}/", hash_including('id' => project_event1.id, 'path' => "#{group.id}/#{project.project_namespace.id}/",
'target_type' => 'Issue') 'target_type' => 'Issue')
......
...@@ -59,12 +59,12 @@ ...@@ -59,12 +59,12 @@
context 'when the previous job was not finished' do context 'when the previous job was not finished' do
it 'continues the processing from the cursor' do it 'continues the processing from the cursor' do
ClickHouse::SyncCursor.update_cursor_for(:event_authors_consistency_check, deleted_user_id1) ClickHouse::SyncCursor.update_cursor_for(:event_authors_consistency_check, deleted_user_id2)
worker.perform worker.perform
# the previous records should remain # the previous records should remain
expect(leftover_author_ids).to contain_exactly(user1.id, user2.id) expect(leftover_author_ids).to contain_exactly(user1.id, user2.id, deleted_user_id1)
end end
end end
......
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册