Coder Social home page Coder Social logo

Comments (10)

charlenni avatar charlenni commented on June 11, 2024 1

Ok, after rebooting the system and deleting all the obj and bin folders, the tests run again.

Thank you for your help.

from mapsui.

pauldendulk avatar pauldendulk commented on June 11, 2024

Thanks, this is important to get right. So far, I had never seen these tests fail locally or on the build server.

DelayerTestsShouldNotHangAsync: I could not reproduce this be increasing the repeats. Only when I set the delay before the assert lower. Because of the indetermined way the threads are scheduled this can happen with correct behavior. Perhaps something like this happened on you machine with the default delay. I rewrote the test so that it waits longer, but not if the method is already called, so many repeats are relatively fast.

FeatureFetcherTests: With many repeats I could get this test to fail consistently. It was quite hard to find the cause. I could fix it by replacing the lambda on the PropertyChanged in the test with a local method. The PropertyChanged implementation is using weak references and apparently the lambda gets garbage collected. Since this problem may hit our users as well we may need to reconsider this implementation. I am considering completed callbacks:

layer.RefreshData(fetchInfo, (a) => { /*Do something on completed*/ });

Also relevant for @inforithmics.

from mapsui.

charlenni avatar charlenni commented on June 11, 2024

There are even more tests that don't work. One example is "Shapefile with labels". It also runs not on the Avalonia sample app. Or the "WFS points" sample, which runs endless.

from mapsui.

pauldendulk avatar pauldendulk commented on June 11, 2024

We have automated test runs on all PRs and all the tests are always green before a PR is merged. If tests run longer that 60 seconds (I just increased it for longer running fetcher tests) the build automatically fails.

The render tests run samples which were not initially designed for testing. It was a great improvement to this project to run automated tests on all the samples (thanks to Thomas). Initially these were flaky for various reasons, this has improved over time, but I still see some flaky tests, we need to deal with that. One problem is tests with animations. Perhaps we should exclude them for now. It would be nice if we could controls those test though, for instance, we could tell it to update for 10 iterations and produce the test image.

The samples should also always run correctly but those is harder to test. They need manual testing and we do not have time for this. We rely in part on bug reports like yours, and our own random observations.

WFS Points: This seems to behave as it should on Avalonia on my Windows machine. What do you mean with 'runs endless'?There is not loop logic in the sample. What confused me is the PanLock = true. Is there a specific reason for this @inforithmics?

Shapefile with labels: Behaves as expected to me, as far is I can judge.

from mapsui.

inforithmics avatar inforithmics commented on June 11, 2024

No the Panlock= true can be removed

from mapsui.

inforithmics avatar inforithmics commented on June 11, 2024

The Tests sometimes work and the samples don’t is because sometimes the services used change addresses or layers. The tests run on cached data so that data changes don’t affect tests. Maybe I could make additional tests to only run the samples without comparing the rendering detecting address changes faster.

from mapsui.

pauldendulk avatar pauldendulk commented on June 11, 2024

@inforithmics Perhaps it could be an option to run then with or without the caches. But we should not run automated tests against those remote services. If such an option is added we it should be manually run, perhaps with the nunit [Explicit] attribute.

from mapsui.

inforithmics avatar inforithmics commented on June 11, 2024

Good idea with the Explicit Attribute I didn't know this existed.

from mapsui.

charlenni avatar charlenni commented on June 11, 2024

I checked for all updates (Mapsui and VS 2022 17.9.6) to see, that they are at the latest. Then I restart VS and load Mapsui again. After that I started the Mapsui.Tests tests with the following results:
grafik
Wait now for over 5 minutes.

So I do something wrong, or the tests are not running here for any special reason.

from mapsui.

pauldendulk avatar pauldendulk commented on June 11, 2024

Could you close VS. Run scripts/DeleteBinAndObjFolders.ps1 in Powershell in the Mapsui.sln folder and then try again? I need to do this a lot these days. Especially when switching between the develop/4.1 and main branch. I work with two checkout because of this.

You are running on a Windows machine?

from mapsui.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.