Skip to content

Commit 2a75ca0

Browse files
committed
Fix test PutOne_Update_Test
1 parent 308ce73 commit 2a75ca0

File tree

2 files changed

+2
-9
lines changed

2 files changed

+2
-9
lines changed

DataGateway.Service.Tests/SqlTests/MySqlRestApiTests.cs

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -402,14 +402,7 @@ public override string GetQuery(string key)
402402
[Ignore]
403403
public override Task PutOne_Insert_PKAutoGen_Test()
404404
{
405-
throw new NotImplementedException("error: Fail, still able to insert");
406-
}
407-
408-
[TestMethod]
409-
[Ignore]
410-
public override Task PutOne_Update_Test()
411-
{
412-
throw new NotImplementedException("error: While processing your request the server ran into an unexpected error");
405+
throw new NotImplementedException("Insert success");
413406
}
414407
}
415408
}

DataGateway.Service/Resolvers/SqlMutationEngine.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ await PerformMutationOperation(
124124
/// In MsSQL upsert:
125125
/// result set #1: result of the UPDATE operation.
126126
/// result set #2: result of the INSERT operation.
127-
if (await dbDataReader.NextResultAsync())
127+
if (await dbDataReader.NextResultAsync() && resultRecord == null)
128128
{
129129
// Since no first result set exists, we overwrite Dictionary here.
130130
resultRecord = await ExtractRowFromDbDataReader(dbDataReader);

0 commit comments

Comments
 (0)