Open Closed

Unit Tests are failing due to Hangfire #9116


User avatar
0
sukhdeep.dhillon created

Hi team,

I'm having the same issue mentioned in the following thread after upgrading the ABP to 9.1.1

https://abp.io/support/questions/8388/Configure-Hangfire-with-In-Memory-Provider-for-Integration-Testing

Unit tests starts failing. is there any solution to this.


5 Answer(s)
  • User Avatar
    0
    EngincanV created
    Support Team .NET Developer

    Hi, in your TestBase project, can you please check there is a configuration as below (in the module class):

            Configure<AbpBackgroundJobOptions>(options =>
            {
                options.IsJobExecutionEnabled = false;
            });
    
  • User Avatar
    0
    sukhdeep.dhillon created

    yes, its there. it was working fine before upgrading to 9.1.1

  • User Avatar
    0
    EngincanV created
    Support Team .NET Developer

    yes, its there. it was working fine before upgrading to 9.1.1

    Okay, interesting to hear that. I will create a new template with v9.1.1 and try to reproduce it, but in the meantime, by any chance, can you please share the error message in the failed unit test and the failed tests?

  • User Avatar
    0
    EngincanV created
    Support Team .NET Developer

    Hi, in v9.1.1 we upgraded the Hangfire.AspNetCore from v1.8.17 to v1.8.18 and it seems this is the reason for the problem (https://github.com/HangfireIO/Hangfire/issues/2437). So, in your application, you can manually set its version to v1.8.17 for a quick workaround, and then it should start working again as expected:

        
        <PackageReference Include="Hangfire.SqlServer" Version="1.8.17" />
        <PackageReference Include="Hangfire.AspNetCore" Version="1.8.17" />
    
    
  • User Avatar
    0
    sinancondo created

    Sound like v 9.1.1 is dependent on v 1.8.17 , please check the image, also if I update to 1.8.18 I get version conflict because v 9.1.1 want Hangfire v 1.8.17. please let me know if I missed something

    image.png

    As for reverting to our original version 1.8.14 , that not possible because v9.1.1 require 1.8.17 version as we stated above. Please advise.
    thanks

Boost Your Development
ABP Live Training
Packages
See Trainings
Mastering ABP Framework Book
Do you need assistance from an ABP expert?
Schedule a Meeting
Mastering ABP Framework Book
The Official Guide
Mastering
ABP Framework
Learn More
Mastering ABP Framework Book
Made with ❤️ on ABP v9.3.0-preview. Updated on April 11, 2025, 10:10