Skip to content

Commit 456c684

Browse files
committed
test(discovery): fix failing discovery tests
1 parent 2233ac0 commit 456c684

File tree

2 files changed

+2
-25
lines changed

2 files changed

+2
-25
lines changed

Scripts/Services/Discovery/v1/Discovery.cs

Lines changed: 1 addition & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -3938,31 +3938,8 @@ private class DeleteTokenizationDictionaryRequestObj : RESTConnector.Request
39383938
private void OnDeleteTokenizationDictionaryResponse(RESTConnector.Request req, RESTConnector.Response resp)
39393939
{
39403940
object result = new object();
3941-
fsData data = null;
39423941
Dictionary<string, object> customData = ((DeleteTokenizationDictionaryRequestObj)req).CustomData;
3943-
3944-
if (resp.Success)
3945-
{
3946-
try
3947-
{
3948-
fsResult r = fsJsonParser.Parse(Encoding.UTF8.GetString(resp.Data), out data);
3949-
if (!r.Succeeded)
3950-
throw new WatsonException(r.FormattedMessages);
3951-
3952-
object obj = result;
3953-
r = _serializer.TryDeserialize(data, obj.GetType(), ref obj);
3954-
if (!r.Succeeded)
3955-
throw new WatsonException(r.FormattedMessages);
3956-
3957-
customData.Add("json", data);
3958-
}
3959-
catch (Exception e)
3960-
{
3961-
Log.Error("Discovery.OnDeleteTokenizationDictionaryResponse()", "Exception: {0}", e.ToString());
3962-
resp.Success = false;
3963-
}
3964-
}
3965-
3942+
39663943
if (resp.Success)
39673944
{
39683945
if (((DeleteTokenizationDictionaryRequestObj)req).SuccessCallback != null)

Scripts/UnitTests/TestDiscovery.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -475,7 +475,7 @@ private void OnDeleteJpCollection(DeleteCollectionResponse response, Dictionary<
475475

476476
private void OnDeleteTokenizationDictionary(object response, Dictionary<string, object> customData)
477477
{
478-
Log.Debug("TestDiscovery.OnDeleteTokenizationDictionary()", "Discovery - delete tokenization dictionary: deleted:{0}", customData["json"].ToString());
478+
Log.Debug("TestDiscovery.OnDeleteTokenizationDictionary()", "Discovery - delete tokenization dictionary: deleted");
479479
Test(response != null);
480480

481481
_deleteTokenizationDictTested = true;

0 commit comments

Comments
 (0)