Comments (10)
Ok, after rebooting the system and deleting all the obj and bin folders, the tests run again.
Thank you for your help.
from mapsui.
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.
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.
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.
No the Panlock= true can be removed
from mapsui.
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.
@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.
Good idea with the Explicit Attribute I didn't know this existed.
from mapsui.
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:
Wait now for over 5 minutes.
So I do something wrong, or the tests are not running here for any special reason.
from mapsui.
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)
- Allow adding EventHandlers
- Website/documentation high CPU usage HOT 1
- How to modify ZOrder of IFeature ? HOT 4
- Animations freeze in WPF under heavy load. HOT 2
- How to use EditingWidget HOT 1
- Can use RasterizingLayer and open IsMapInfoLayer=true,performance degradation HOT 1
- Replacement of map.home function in 5.0 Beta HOT 3
- Maui performance issues under Android HOT 20
- Wrong attribution link after switching map layer HOT 2
- Performance collapse with many Refresh calls and zooming out HOT 2
- Layer is not updated after fetches because the Delayer hangs HOT 1
- Viewport.Rotation could get to 360 ° or more HOT 9
- Improve RasterStyle HOT 4
- [Uno] Use SKSwapChainPanel whenever possible HOT 2
- In Map.DataChanged event, DataChangedEventArgs Layer name is empty. It should contains the Layer Name. HOT 3
- [UNO] MapInfo tapable area is off from symbol HOT 8
- Density Coordination HOT 2
- IDisposable guidelines HOT 1
- Map.Info eventargs return null for args.MapInfo.Feature when clicking on feature. HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mapsui.