mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-25 17:12:03 +00:00
Fix rabbitmq
This commit is contained in:
parent
88b1807434
commit
93b3fcc195
@ -1,5 +1,6 @@
|
||||
#include <Storages/RabbitMQ/RabbitMQSource.h>
|
||||
|
||||
#include <Formats/FormatFactory.h>
|
||||
#include <Interpreters/Context.h>
|
||||
#include <Processors/Formats/InputStreamFromInputFormat.h>
|
||||
#include <Processors/Executors/StreamingFormatExecutor.h>
|
||||
@ -118,8 +119,8 @@ Chunk RabbitMQSource::generateImpl()
|
||||
is_finished = true;
|
||||
|
||||
MutableColumns virtual_columns = virtual_header.cloneEmptyColumns();
|
||||
auto input_format = context->getInputFormat(
|
||||
storage.getFormatName(), *buffer, non_virtual_header, max_block_size);
|
||||
auto input_format = FormatFactory::instance().getInputFormat(
|
||||
storage.getFormatName(), *buffer, non_virtual_header, context, max_block_size);
|
||||
|
||||
StreamingFormatExecutor executor(non_virtual_header, input_format);
|
||||
|
||||
|
@ -463,11 +463,13 @@ def test_rabbitmq_big_message(rabbitmq_cluster):
|
||||
for message in messages:
|
||||
channel.basic_publish(exchange='big', routing_key='', body=message)
|
||||
|
||||
while True:
|
||||
for _ in range(300):
|
||||
result = instance.query('SELECT count() FROM test.view')
|
||||
if int(result) == batch_messages * rabbitmq_messages:
|
||||
break
|
||||
|
||||
time.sleep(1)
|
||||
|
||||
connection.close()
|
||||
instance.query('''
|
||||
DROP TABLE test.consumer;
|
||||
|
Loading…
Reference in New Issue
Block a user