From dcfbaf303301caede3fe984ebb3bf14f771e0565 Mon Sep 17 00:00:00 2001 From: Sergey Yakubov <sergey.yakubov@desy.de> Date: Wed, 20 Oct 2021 13:08:26 +0200 Subject: [PATCH] fix tests --- broker/src/asapo_broker/server/get_commands_test.go | 8 ++++---- tests/automatic/consumer/consumer_api/consumer_api.c | 1 + 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/broker/src/asapo_broker/server/get_commands_test.go b/broker/src/asapo_broker/server/get_commands_test.go index dc0389fb1..17f3aea5a 100644 --- a/broker/src/asapo_broker/server/get_commands_test.go +++ b/broker/src/asapo_broker/server/get_commands_test.go @@ -43,18 +43,18 @@ var testsGetCommand = []struct { queryParams string externalParam string }{ -/* {"last", expectedSource,expectedStream, "", expectedStream + "/0/last","","0"}, + {"last", expectedSource,expectedStream, "", expectedStream + "/0/last","","0"}, {"id", expectedSource,expectedStream, "", expectedStream + "/0/1","","1"}, {"meta", expectedSource,"default", "", "default/0/meta/0","","0"}, - {"nacks",expectedSource, expectedStream, expectedGroupID, expectedStream + "/" + expectedGroupID + "/nacks","","0_0"},*/ + {"nacks",expectedSource, expectedStream, expectedGroupID, expectedStream + "/" + expectedGroupID + "/nacks","","0_0"}, {"groupedlast", expectedSource,expectedStream, expectedGroupID, expectedStream + "/" + expectedGroupID + "/groupedlast","",""}, -/* {"next", expectedSource,expectedStream, expectedGroupID, expectedStream + "/" + expectedGroupID + "/next","",""}, + {"next", expectedSource,expectedStream, expectedGroupID, expectedStream + "/" + expectedGroupID + "/next","",""}, {"next", expectedSource,expectedStream, expectedGroupID, expectedStream + "/" + expectedGroupID + "/next","&resend_nacks=true&delay_ms=10000&resend_attempts=3","10000_3"}, {"size", expectedSource,expectedStream, "", expectedStream + "/size","",""}, {"size",expectedSource, expectedStream, "", expectedStream + "/size","&incomplete=true","true"}, {"streams",expectedSource, "0", "", "0/streams","","0/"}, - {"lastack", expectedSource,expectedStream, expectedGroupID, expectedStream + "/" + expectedGroupID + "/lastack","",""},*/ + {"lastack", expectedSource,expectedStream, expectedGroupID, expectedStream + "/" + expectedGroupID + "/lastack","",""}, } diff --git a/tests/automatic/consumer/consumer_api/consumer_api.c b/tests/automatic/consumer/consumer_api/consumer_api.c index f89b792f6..d9996ddde 100644 --- a/tests/automatic/consumer/consumer_api/consumer_api.c +++ b/tests/automatic/consumer/consumer_api/consumer_api.c @@ -32,6 +32,7 @@ void test_datasets(AsapoConsumerHandle consumer, AsapoStringHandle group_id) { // get last in group dataset = asapo_consumer_get_last_dataset_ingroup(consumer,group_id, 0, "default", &err); EXIT_IF_ERROR("asapo_consumer_get_last_dataset_ingroup", err); + asapo_free_handle(&dataset); AsapoDataSetHandle ds_ig = asapo_consumer_get_last_dataset_ingroup(consumer,group_id, 0, "default", &err); ASSERT_TRUE(ds_ig == NULL,"returns null in case of error"); ASSERT_TRUE(asapo_error_get_type(err) == kEndOfStream,"asapo_consumer_get_last_dataset_ingroup second time end of stream error"); -- GitLab