Skip to content
Browse files

Ignore non-deterministic monitor event specs.

Closes #103.

The address reported by ZMQ for Connected & Closed monitor events may be
garbage data and cannot be reliably tested. This is because the memory
address sent in the event message may point to a string that no longer
exists for whatever reason (socket closing, etc.).

This appears to be a known issue: LIBZMQ-450 (Jira).
  • Loading branch information...
1 parent 6ef5fb1 commit 7f374917794b2487da5504a08f9dc1ebecb3a3ec @jgoz jgoz committed Nov 13, 2012
View
6 src/ZeroMQ.AcceptanceTests/ZmqMonitorTests/MonitorEvents.cs
@@ -1,8 +1,8 @@
namespace ZeroMQ.AcceptanceTests.ZmqMonitorTests
{
using System;
+ using Monitoring;
using NUnit.Framework;
- using ZeroMQ.Monitoring;
[TestFixture]
public class MonitorTests
@@ -128,7 +128,7 @@ public void ShouldFireTheConnectedEvent()
Assert.IsTrue(Fired);
}
- [Test]
+ [Test, Ignore("LIBZMQ-450: address pointed to in event message may no longer exist when accessed.")]
public void ShouldSetTheConnectedSocketAddress()
{
Assert.AreEqual("tcp://127.0.0.1:9000", Address);
@@ -168,7 +168,7 @@ public void ShouldFireTheClosedEvent()
Assert.IsTrue(Fired);
}
- [Test]
+ [Test, Ignore("LIBZMQ-450: address pointed to in event message may no longer exist when accessed.")]
public void ShouldSetTheClosedSocketAddress()
{
Assert.AreEqual("tcp://0.0.0.0:9000", Address);
View
8 src/ZeroMQ/Monitoring/MonitorEvents.cs
@@ -10,11 +10,9 @@ public enum MonitorEvents
{
/// <summary>
/// Triggered when a connection has been established to a remote peer. This can happen either synchronously or asynchronously.
- /// </summary>
- /// <remarks>
/// NOTE: Do not rely on the 'addr' value for 'Connected' messages, as the memory
/// address contained in the message may no longer point to the correct value.
- /// </remarks>
+ /// </summary>
Connected = 1,
/// <summary>
@@ -49,11 +47,9 @@ public enum MonitorEvents
/// <summary>
/// Triggered when a connection's underlying descriptor has been closed.
- /// </summary>
- /// <remarks>
/// NOTE: Do not rely on the 'addr' value for 'Closed' messages, as the memory
/// address contained in the message may no longer point to the correct value.
- /// </remarks>
+ /// </summary>
Closed = 128,
/// <summary>
View
8 src/ZeroMQ/Monitoring/ZmqMonitor.cs
@@ -44,12 +44,10 @@ internal ZmqMonitor(ZmqSocket socket, string endpoint)
/// <summary>
/// Occurs when a new connection is established.
- /// </summary>
- /// <remarks>
/// NOTE: Do not rely on the <see cref="ZmqMonitorEventArgs.Address"/> value for
/// 'Connected' messages, as the memory address contained in the message may no longer
/// point to the correct value.
- /// </remarks>
+ /// </summary>
public event EventHandler<ZmqMonitorFileDescriptorEventArgs> Connected;
/// <summary>
@@ -84,12 +82,10 @@ internal ZmqMonitor(ZmqSocket socket, string endpoint)
/// <summary>
/// Occurs when a connection was closed.
- /// </summary>
- /// <remarks>
/// NOTE: Do not rely on the <see cref="ZmqMonitorEventArgs.Address"/> value for
/// 'Closed' messages, as the memory address contained in the message may no longer
/// point to the correct value.
- /// </remarks>
+ /// </summary>
public event EventHandler<ZmqMonitorFileDescriptorEventArgs> Closed;
/// <summary>

0 comments on commit 7f37491

Please sign in to comment.
Something went wrong with that request. Please try again.