Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Hadrien Dorio
    @hdorio
    Hi everyone, can someone tell me what's the differences or links between Coyote, P, P# and Zing? And why Zing's use was dropped? (if it was dropped)
    Akash Lal
    @akashlal
    @hdorio Coyote is an evolution of P#. P is a different project. P is its own language with compiler for code generation. Coyote/P# are .NET. P was using Zing earlier but not anymore. I don't think any one is supporting Zing.
    Hadrien Dorio
    @hdorio
    Thanks @akashlal , so what's the differences between P# and Coyote?
    Akash Lal
    @akashlal
    Coyote supports more things, Actors and `Tasks, better logging and many other things.
    renuIyer
    @renuIyer
    Hi all,
    I am new to Coyote and am still going through the sample example. While going over 'https://microsoft.github.io/coyote/#tutorials/test-failover/', I found that it says "Chances are this will find a bug quickly, one of the safety assertions will fire and you will see that a test output log is produced, like this:
    ".\bin\net5.0\Output\CoffeeMachineTasks.exe\CoyoteOutput\CoffeeMachine_0_0.txt""
    I am actually trying to see the log file and the '.schedule' file to be generated which can be used for replaying the failed case.
    Could someone please help me with this?
    PS - My end goal is to try and integrate this with our dotnet core projects - so any guidance towards that is also welcome
    Akash Lal
    @akashlal
    @renuIyer What is the problem that you're facing? Are you able to run coyote test on the sample? It should output a .txt file, which is the log of the failing execution, and also a .schedule file that can be used for coyote replay.
    renuIyer
    @renuIyer
    @akashlal I am able to get the tracelog and schedule file only when I run it with the option to generate DGML graph.
    Also, I need to write tests for .NetCore APIs, is there a simple sample available for the same?
    renuIyer
    @renuIyer
    I was successful in integrating Coyote in existing .NET APIs. However, logging (WithVerbosityEnabled) doesn't generate any logs. Any ideas anyone?
    I am using integration with xunit.
    Chris Lovett
    @lovettchris
    Hi @renulyer, I see the tutorial recommends "coyote test ./bin/net5.0/CoffeeMachineTasks.dll -i 1000 -ms 500 --sch-pct 10" and I see this does not always catch the bug. So what you can do to increase the chance of finding the bug is to use this command line "coyote test ./bin/net5.0/CoffeeMachineTasks.dll -i 1000 -ms 500 --sch-portfolio -p 10" which will use all scheduling strategies and 10 processes to do a lot more testing at once. See "coyote test --help" for more options. There is also a page here on how to integrate coyote into unit tests: https://microsoft.github.io/coyote/#how-to/unit-testing/.
    Oh, and to connect Coyote logging with XUnit ITestOutputHelper you can use Microsoft.Coyote.Tests.Common.TestOutputLogger as a wrapper, and set that on the TestEngine.Logger property.
    renuIyer
    @renuIyer
    Thanks @lovettchris! If anyone has already tried an integration with xunit, please do share once or let me know if I can share a sample and understand if there are any improvements with the current implementation.
    on the logger - I actually initialized and logger separately in the function however, I still do not get the kind of logs available when running from command line (nothing like iteration #1 .. iteration#2 etc.). Am I missing something with the xunit integration. Any settings specific for logging?
    renuIyer
    @renuIyer
    Could anyone help with this error - Deadlock detected. Task(0) is waiting for a task to complete, but no other controlled tasks are enabled. - Coyote is not helping find the actual deadlock but keeps giving this.
    Akash Lal
    @akashlal
    @renuIyer The error means that Coyote found a deadlock. There is a single Task Task(0) that is blocked, but there is nothing else to unblock it. You can try to repro this run and attach a debugger so that you can step through the trace and see what is going on.
    renuIyer
    @renuIyer
    Thanks @akashlal . Also, Is Coyote supported for .netcore 3.1 as of now? or only for .net 5?
    Pantazis Deligiannis
    @pdeligia
    @renuIyer Coyote is indeed supported for both .NET Core 3.1 and the newer .NET 5.0.
    shaya-pb
    @shaya-pb
    Hi - is the coyote-samples repo up to date? The tests in the ImageGallery solution consistently throw a Deadlock detected. Task(0) is waiting for a task to complete, but no other controlled tasks are enabled. coyote error. And when I debug it seems to be thrown when calling a static method which does almost nothing (the clone method here )
    From my understanding this is not the expected error
    shaya-pb
    @shaya-pb
    running the test from the Coyote CLI directly surfaces the following exception: Unhandled exception 'System.IO.FileNotFoundException' was thrown in 'ImageGalleryTests': Could not load file or assembly 'Microsoft.Extensions.Logging.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'. The system cannot find the file specified. which leads me to believe that something needs to be updated in the coyote-samples repo
    shaya-pb
    @shaya-pb
    I think it's the same issue here: microsoft/coyote-samples#39
    moving this convo there
    Chris Lovett
    @lovettchris
    thanks does look like unexpected behavior, I'm investigating
    shaya-pb
    @shaya-pb
    thank you!