def test_drop_stream(self): topic = self.exist_topic stream_name = self.test_prefix + "_test_drop_stream" utils.drop_stream(self.api_client, stream_name) ksql_string = "CREATE STREAM {} (viewtime bigint, userid varchar, pageid varchar) \ WITH (kafka_topic='{}', value_format='DELIMITED');".format( stream_name, topic) self.api_client.ksql(ksql_string) self.assertTrue(utils.get_stream_info(self.api_client, stream_name)) utils.drop_stream(self.api_client, stream_name) self.assertFalse(utils.get_stream_info(self.api_client, stream_name))
def test_get_stream_info(self): topic = self.exist_topic stream_name = self.test_prefix + "_test_get_stream_info" utils.drop_stream(self.api_client, stream_name) ksql_string = "CREATE STREAM {} (viewtime bigint, userid varchar, pageid varchar) \ WITH (kafka_topic='{}', value_format='DELIMITED');".format( stream_name, topic) self.api_client.ksql(ksql_string) stream_info = utils.get_stream_info(self.api_client, stream_name) # print(stream_info['topic']) self.assertEqual(stream_info["topic"], self.exist_topic)