Comments (14)
No idea
from orchard.
SpecFlow test execution is broken at the moment since this commit: 0c34ca3 (that fixes #8445 with PR #8446).
I managed fix some startup errors by adding assembly binding redirects (see aa71039), but now it throws the following error:
None of the constructors found with 'Autofac.Core.Activators.Reflection.DefaultConstructorFinder' on type 'Orchard.Environment.DefaultOrchardShell' can be invoked with the available services and parameters:
Cannot resolve parameter 'Orchard.IWorkContextAccessor workContextAccessor' of constructor 'Void .ctor(Orchard.IWorkContextAccessor, System.Collections.Generic.IEnumerable1[Orchard.Mvc.Routes.IRouteProvider], System.Collections.Generic.IEnumerable
1[Orchard.WebApi.Routes.IHttpRouteProvider], Orchard.Mvc.Routes.IRoutePublisher, System.Collections.Generic.IEnumerable1[Orchard.Mvc.ModelBinders.IModelBinderProvider], Orchard.Mvc.ModelBinders.IModelBinderPublisher, Orchard.Tasks.ISweepGenerator, System.Collections.Generic.IEnumerable
1[Orchard.Owin.IOwinMiddlewareProvider], Orchard.Environment.Configuration.ShellSettings)'.
#5490 and #7785 are about the same error, but in a different situation. The suggested fix was related to file access permissions, which is not the problem here (I tested the compiled Spec test app from IIS). Any suggestions?
from orchard.
Looks like IWorkContextAccessor
is inaccessible. Did you try injecting Lazy?
from orchard.
Yeah, I got as far, and my guess would be that the HttpContext is the underlying problem. I tried wrapping it in Lazy, but that doesn't help (because work context is used during shell activation, so very early on).
from orchard.
Working on this and #8683 in parallel to validate results in GHA - so far unit tests are all fixed where necessary and each one is passing. Continuing with the SpecFlow test execution issue mentioned above.
from orchard.
I've made good progress over the past few days and the build (including static Razor compilation) is completely warning-free + managed to fix all the failing tests (due to breaking changes in the code in recent years) except for one: Orchard.Specs.DateTimeFieldFeature.CreatingAndUsingDateTimeFieldsInAnotherCulture
.
The problem arises when adding a new culture and selecting it as the site culture through the DefineDefaultCulture
binding, because cache invalidation through the signal in DefaultCultureManager
doesn't seem to take effect. Signal usage was added to DefaultCultureManager
in 2010 (!) and then caching was added in 2014, so I'm pretty sure the tests were all green back then (the test itself was created in its current form in 2012). This is only true for running SpecFlow tests - running the "normal" Precompiled application or even the application running the SpecFlow tests from IIS and IIS Express both works fine. If I add an extra step to the SpecFlow test to enable a feature (which restarts the shell and resets the cache) the problem is gone.
Any ideas why signals/caching could be different when running the application through NUnit? CC @sebastienros
from orchard.
I've updated the issue description with the action plan to get 1.10.x and dev back into shape and the first step is to review and merge #8687.
@sebastienros I'd like to ask you to review this PR carefully + I'd appreciate input from the Laser team (tagging @HermesSbicego-Laser and @MatteoPiovanelli-Laser, but please pass it on in the team) due to working on improving Orchard 1 so much recently + everyone else, of course.
I've added a dozen or so comments to my PR with some additional context.
BTW all the unit and SpecFlow tests are passing! https://github.com/OrchardCMS/Orchard/actions/runs/5092692925/jobs/9154372082
from orchard.
If running Orchard.Framework.Tests in VS, it still gets 27 Failed
...
Mocking Orchard.Tasks.IBackgroundService
NUnit VS Adapter 2.3.0.0 executing tests is finished
========== Test run finished: 791 Tests (759 Passed, 27 Failed, 5 Skipped) run in 7.2 min ==========
from orchard.
@lbcsy on which branch? 1.10.x
should be all green now, dev
isn't yet (but issue/8686-dev
should be all green, which will be merged into dev
).
from orchard.
I tried dev as I thought you were referring to dev in your step 3. Good to know dev will be fixed soon.
from orchard.
Today I tried 1.10x, it has 7 failed tests here, they are all in DateFormatterTests, for example:
FormatDateTimeTest03
Source: DefaultDateFormatterTests.cs line 502
Duration: 194 ms
Message:
System.AggregateException : One or more errors occurred.
----> System.ArgumentException : The UTC Offset of the local dateTime parameter does not match the offset argument.
Parameter name: offset
Stack Trace:
Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
Parallel.ForWorker[TLocal](Int32 fromInclusive, Int32 toExclusive, ParallelOptions parallelOptions, Action1 body, Action
2 bodyWithState, Func4 bodyWithLocal, Func
1 localInit, Action1 localFinally) Parallel.ForEachWorker[TSource,TLocal](IEnumerable
1 source, ParallelOptions parallelOptions, Action1 body, Action
2 bodyWithState, Action3 bodyWithStateAndIndex, Func
4 bodyWithStateAndLocal, Func5 bodyWithEverything, Func
1 localInit, Action1 localFinally) Parallel.ForEach[TSource](IEnumerable
1 source, ParallelOptions parallelOptions, Action1 body) DefaultDateFormatterTests.FormatDateTimeTest03() line 513 --ArgumentException DateTimeOffset.ctor(DateTime dateTime, TimeSpan offset) <>c__DisplayClass12_0.<FormatDateTimeTest03>b__0(CultureInfo culture) line 539 <>c__DisplayClass17_0
1.b__1()
Task.InnerInvokeWithArg(Task childTask)
<>c__DisplayClass176_0.b__0(Object )
Others are:
- ParseDateTest01
- ParseDateTimeTest01
- ParseDateTimeTest02
- ParseDateTimeTest03
- ParseDateTimeTest04
- ParseTimeTest01
from orchard.
Yeah, I've got the same locally - I couldn't find a fix so far, but it's almost certainly down to culture / date formatting settings, so I just deferred to the GitHub Actions execution, which is successful.
from orchard.
@sebastienros after our discussion yesterday, I merged in #8685, then I made some further updates to #8686 and squash-merged that, so to sum up this journey:
- Builds (with Razor compilation and warnings treated as errors), unit tests and SpecFlow tests all pass on 1.10.x and dev, see this run: https://github.com/OrchardCMS/Orchard/actions/runs/8202299611
- Compile workflow runs on PRs and commits on 1.10.x and dev: runs the build and unit tests.
- SpecFlow tests workflow runs every day at midnight and also executes the SpecFlow test on top of what Compile does (so it's the same as the nightly builds in TeamCity).
- Deleted the TeamCity project.
from orchard.
Yeah, I've got the same locally - I couldn't find a fix so far, but it's almost certainly down to culture / date formatting settings, so I just deferred to the GitHub Actions execution, which is successful.
When DateTime.Parse is used, specify Culture.Invariant
if you assume it's the ISO format
from orchard.
Related Issues (20)
- Password encryption in settings.txt file HOT 1
- Duplicated results when multiple terms are selected in a content item
- proposal: cascade delete taxonomy -> terms HOT 1
- How to set session time out for Admin Dash board in Orchard CMS
- possible improvement: Blog Archives could be cached HOT 4
- Losing selected terms when failing a validation
- Load extensions from subfolders (Please Help) HOT 5
- Path generation is case sensitive and it potentially generates path that are actually the same path
- NHibernate Exception in ContentPickerField Loading
- ResizeMediaUrl fails for vector images HOT 3
- Workaround for file extension out from filename.slice() with "." inside HOT 6
- Performance issue when opening the widget admin page HOT 6
- Management of a new hide/show field in frontend HOT 4
- Adding chain to Slug token to enable slug length limit
- MenuText throws an exception when user sets a very long text when creating menu items
- Building latest 1.10.x from command line HOT 3
- Remove Orchard.Azure.MediaServices as it's being deprecated
- LazyField loader throwing an exception in TermsPartHandler (Orchard.Taxonomies)
- Orchard.Taxonomies.Handlers.TermsPartHandler: Lifetime scope already disposed when accessing LazyField
- Merge 1.10.x into dev (Lombiq Technologies: ORCH-282)
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 orchard.