diff --git a/tests/Server/ZB.MOM.WW.OtOpcUa.ScriptWorker.Tests/ShadowModeTests.cs b/tests/Server/ZB.MOM.WW.OtOpcUa.ScriptWorker.Tests/ShadowModeTests.cs index b447ad67c..3ac028603 100644 --- a/tests/Server/ZB.MOM.WW.OtOpcUa.ScriptWorker.Tests/ShadowModeTests.cs +++ b/tests/Server/ZB.MOM.WW.OtOpcUa.ScriptWorker.Tests/ShadowModeTests.cs @@ -102,7 +102,10 @@ public sealed class ShadowModeTests ["quality"] = "return ctx.GetTag(\"i\").StatusCode;", ["throws"] = "if ((int)ctx.GetTag(\"i\").Value >= 0) throw new InvalidOperationException(\"boom \" + ctx.GetTag(\"i\").Value); return 0;", ["divergent"] = $"return {InWorker} ? 2 : 1;", + // lmxopcua#1100: a decimal is refused by both runners alike now (no OPC UA node can carry it), so it MATCHES; + // the one result shape left that only the worker refuses is a jagged array (no nested-array wire tag). ["decimal"] = "return 1.5m;", + ["jagged"] = "return new[] { new[] { (int)ctx.GetTag(\"i\").Value } };", }; for (var i = 0; i < 3; i++) @@ -122,12 +125,12 @@ public sealed class ShadowModeTests stats.Compared.ShouldBe(scripts.Count * 3); stats.Mismatched.ShouldBe(6, string.Join(Environment.NewLine, shadow.Mismatches.Select(m => $"{m.Key}: {m.LastReason} — {m.LastSummary}"))); var mismatches = shadow.Mismatches.ToDictionary(m => m.Key); - mismatches.Keys.ShouldBe(["decimal", "divergent"], ignoreOrder: true); + mismatches.Keys.ShouldBe(["jagged", "divergent"], ignoreOrder: true); mismatches["divergent"].LastReason.ShouldBe("value"); mismatches["divergent"].LastSummary.ShouldBe("published Ok Int32 1; shadow Ok Int32 2"); mismatches["divergent"].Count.ShouldBe(3); - mismatches["decimal"].LastReason.ShouldBe("unsupported_type"); - mismatches["decimal"].LastSummary.ShouldContain("System.Decimal"); + mismatches["jagged"].LastReason.ShouldBe("unsupported_type"); + mismatches["jagged"].LastSummary.ShouldContain("System.Int32[][]"); var lines = log.Events.Where(e => e.MessageTemplate.Text.StartsWith("Script shadow mismatch", StringComparison.Ordinal)).ToArray(); lines.Length.ShouldBe(2, "one line per script and reason");