Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change in behaviour of ToObservableChangeSet with expireAfter in v6.14.* #358

Closed
aguahombre opened this issue May 7, 2020 · 4 comments · Fixed by #603
Closed

Change in behaviour of ToObservableChangeSet with expireAfter in v6.14.* #358

aguahombre opened this issue May 7, 2020 · 4 comments · Fixed by #603
Labels

Comments

@aguahombre
Copy link

The ToObservableChangeSet expireAfter no longer works in v6.14.* if the the source IObservable<IEnumerable> completes before the timeout occurs.

Using this example compiled with v6.13.21 using .netcore 3.1 console program on Windows 10

static void Main(string[] args)
{
    Observable.Return(Enumerable.Range(0, 10).Select(i => new { A = i, B = 2 * i }))
        .ToObservableChangeSet(x => x.A, _ => TimeSpan.FromSeconds(5))
        .Subscribe(x => Console.WriteLine($"{DateTime.UtcNow} {x.Count}:\n  {string.Join("\n  ", x)}"));
    Console.ReadKey();
}

produces the output
image

but with v6.14.18
image

I would expect the v6.13.21 behaviour to occur; i.e. the items to be removed from the change set after 5 seconds.

@aguahombre aguahombre added the bug label May 7, 2020
@RLittlesII
Copy link
Member

@aguahombre Thank you for providing this report. We will look into it and provide and update.

Also, is there a list of dependent libraries and their versions per test execution?

@aguahombre
Copy link
Author

Here is the project file

<Project Sdk="Microsoft.NET.Sdk">

  <PropertyGroup>
    <OutputType>Exe</OutputType>
    <TargetFramework>netcoreapp3.1</TargetFramework>
  </PropertyGroup>

  <ItemGroup>
    <PackageReference Include="DynamicData" Version="6.14.18" />
  </ItemGroup>

</Project>

and the using statements

using System;
using System.Linq;
using System.Reactive.Linq;
using DynamicData;

@RolandPheasant
Copy link
Collaborator

It's been long overdue for me looking at this. But the change which creates there error was introduced in the commit.

It's not obvious why this would be an issue but I'll take a look. Ideally it can be reproduced in a unit test.

RolandPheasant added a commit that referenced this issue Jun 8, 2022
…project existed ToObservableChangeSet no longer has a memory leak. Fixes #358

Additionally restore behaviour as per issue 358. Fixes #358
RolandPheasant added a commit that referenced this issue Jun 9, 2022
Complete re-write of ToObservableChangeSet. Fixes #604

* Fix memory leaks in ToObservableChangeSet no longer has a memory leak.  Fixes #307
* Restore expiry not working after source observable completes. Fixes #358
* Revert issue #326  / #327
@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 24, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants