Skip to content

Commit

Permalink
Remove Ignore and comment writing samples
Browse files Browse the repository at this point in the history
  • Loading branch information
jmmorato committed Dec 18, 2024
1 parent e3f1856 commit f44c8ca
Showing 1 changed file with 28 additions and 28 deletions.
56 changes: 28 additions & 28 deletions Tests/OpenDDSharp.UnitTest/DataReaderCDRTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1856,7 +1856,6 @@ public void TestTakeInstance()
/// </summary>
[TestMethod]
[TestCategory(TEST_CATEGORY)]
[Ignore("Is it the test failing?")]
public void TestReadNextInstance()
{
using var evt = new ManualResetEventSlim(false);
Expand All @@ -1877,9 +1876,11 @@ public void TestReadNextInstance()
};
var reader = _subscriber.CreateDataReader(_topic, drQos);
Assert.IsNotNull(reader);

var dataReader = new TestIncludeDataReader(reader);
Assert.IsNotNull(dataReader);

var statusCondition = reader.StatusCondition;
var statusCondition = dataReader.StatusCondition;
statusCondition.EnabledStatuses = StatusKind.DataAvailableStatus;

var publisher = _participant.CreatePublisher();
Expand All @@ -1900,31 +1901,31 @@ public void TestReadNextInstance()
var found = reader.WaitForPublications(1, 5000);
Assert.IsTrue(found);

// Write two samples of three different instances
for (short i = 1; i <= 3; i++)
{
evt.Reset();
TestHelper.CreateWaitSetThread(evt, statusCondition);

result = dataWriter.Write(new TestInclude { Id = i.ToString() });
Assert.AreEqual(ReturnCode.Ok, result);

result = dataWriter.WaitForAcknowledgments(duration);
Assert.AreEqual(ReturnCode.Ok, result);

Assert.IsTrue(evt.Wait(1_500));

evt.Reset();
TestHelper.CreateWaitSetThread(evt, statusCondition);

result = dataWriter.Write(new TestInclude { Id = i.ToString(), ShortField = i });
Assert.AreEqual(ReturnCode.Ok, result);

result = dataWriter.WaitForAcknowledgments(duration);
Assert.AreEqual(ReturnCode.Ok, result);

Assert.IsTrue(evt.Wait(1_500));
}
// // Write two samples of three different instances
// for (short i = 1; i <= 3; i++)
// {
// evt.Reset();
// TestHelper.CreateWaitSetThread(evt, statusCondition);
//
// result = dataWriter.Write(new TestInclude { Id = i.ToString() });
// Assert.AreEqual(ReturnCode.Ok, result);
//
// result = dataWriter.WaitForAcknowledgments(duration);
// Assert.AreEqual(ReturnCode.Ok, result);
//
// Assert.IsTrue(evt.Wait(1_500));
//
// evt.Reset();
// TestHelper.CreateWaitSetThread(evt, statusCondition);
//
// result = dataWriter.Write(new TestInclude { Id = i.ToString(), ShortField = i });
// Assert.AreEqual(ReturnCode.Ok, result);
//
// result = dataWriter.WaitForAcknowledgments(duration);
// Assert.AreEqual(ReturnCode.Ok, result);
//
// Assert.IsTrue(evt.Wait(1_500));
// }

// // Read next instance with the simplest overload
// var data = new List<TestInclude>();
Expand Down Expand Up @@ -1988,7 +1989,6 @@ public void TestReadNextInstance()
/// </summary>
[TestMethod]
[TestCategory(TEST_CATEGORY)]
[Ignore("Is it the test failing?")]
public void TestTakeNextInstance()
{
using var evt = new ManualResetEventSlim(false);
Expand Down

0 comments on commit f44c8ca

Please sign in to comment.