Skip to content

Commit

Permalink
fixup! Update in-process resolver to support flag metadata open-featu…
Browse files Browse the repository at this point in the history
…re#305

Signed-off-by: christian.lutnik <christian.lutnik@dynatrace.com>
  • Loading branch information
chrfwow committed Jan 20, 2025
1 parent 4709b8f commit 0a13cdd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ internal FlagSyncData Parse(string flagConfigurations)
var value = data.Metadata[key];
if (value is long longValue)
{
data.Metadata[key] = (int)longValue;
value = data.Metadata[key] = (int)longValue;
}

VerifyMetadataValue(key, value);
Expand All @@ -115,7 +115,7 @@ internal FlagSyncData Parse(string flagConfigurations)
var value = flagConfig.Value.Metadata[key];
if (value is long longValue)
{
flagConfig.Value.Metadata[key] = (int)longValue;
value = flagConfig.Value.Metadata[key] = (int)longValue;
}

VerifyMetadataValue(key, value);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -376,8 +376,6 @@ public void TestJsonEvaluatorFlagMetadataOverwritesFlagSetMetadata()

var result = jsonEvaluator.ResolveBooleanValueAsync("metadata-flag", false);

var a = result.FlagMetadata.GetInt("integer");

Assert.NotNull(result.FlagMetadata);
Assert.Equal("1.0.2", result.FlagMetadata.GetString("string"));
Assert.Equal(2, result.FlagMetadata.GetInt("integer"));
Expand Down

0 comments on commit 0a13cdd

Please sign in to comment.