Base solution for your next web application
Starts in:
01 DAYS
01 HRS
01 MIN
01 SEC
Open Closed

Test project not running because of Sqlite exception #4725


User avatar
0
squaresunion created

No matter which test project I try to run I have an exception Message: Microsoft.Data.Sqlite.SqliteException : SQLite Error 1: 'near "max": syntax error'. Can you guys help me with that? This is very annoying.

Regards


5 Answer(s)
  • User Avatar
    0
    alper created
    Support Team

    is it the full exception stack?

  • User Avatar
    0
    squaresunion created

    here is the full stack exception

    Test Name: **************Tests.Should_Get_Full Test FullName: **************Tests.Should_Get_Full Test Source: *****************************AppService_Tests.cs : line 24 Test Outcome: Failed Test Duration: 0:00:00.001

    Result StackTrace: at Microsoft.Data.Sqlite.SqliteException.ThrowExceptionForRC(Int32 rc, sqlite3 db) at Microsoft.Data.Sqlite.SqliteCommand.ExecuteReader(CommandBehavior behavior) at Microsoft.Data.Sqlite.SqliteCommand.ExecuteReader() at Microsoft.Data.Sqlite.SqliteCommand.ExecuteNonQuery() at Microsoft.EntityFrameworkCore.Storage.Internal.RelationalCommand.Execute(IRelationalConnection connection, DbCommandMethod executeMethod, IReadOnlyDictionary2 parameterValues) at Microsoft.EntityFrameworkCore.Storage.Internal.RelationalCommand.ExecuteNonQuery(IRelationalConnection connection, IReadOnlyDictionary2 parameterValues) at Microsoft.EntityFrameworkCore.Migrations.MigrationCommand.ExecuteNonQuery(IRelationalConnection connection, IReadOnlyDictionary2 parameterValues) at Microsoft.EntityFrameworkCore.Migrations.Internal.MigrationCommandExecutor.ExecuteNonQuery(IEnumerable1 migrationCommands, IRelationalConnection connection) at Microsoft.EntityFrameworkCore.Storage.RelationalDatabaseCreator.CreateTables() at Microsoft.EntityFrameworkCore.Storage.RelationalDatabaseCreator.EnsureCreated() at Microsoft.EntityFrameworkCore.Infrastructure.DatabaseFacade.EnsureCreated() at *******************.Tests.DependencyInjection.ServiceCollectionRegistrar.Register(IIocManager iocManager) in ***************************\DependencyInjection\ServiceCollectionRegistrar.cs:line 31 at **********************TestModule.Initialize() in ********************************************************.Tests*****************TestModule.cs:line 63 at Abp.Modules.AbpModuleManager.<>c.<StartModules>b__15_1(AbpModuleInfo module) at System.Collections.Generic.List1.ForEach(Action1 action) at Abp.Modules.AbpModuleManager.StartModules() at Abp.AbpBootstrapper.Initialize() at Abp.TestBase.AbpIntegratedTestBase1.InitializeAbp() at Abp.TestBase.AbpIntegratedTestBase1..ctor(Boolean initializeAbp) at *******************************.Tests.AppTestBase..ctor() in ********************************************************************\AppTestBase.cs:line 27 at **********************_Tests..ctor() in ****************************************************************_Tests.cs:line 17 Result Message: Microsoft.Data.Sqlite.SqliteException : SQLite Error 1: 'near "max": syntax error'.

  • User Avatar
    0
    ismcagdas created
    Support Team

    @SquaresUnion it is probably related to this issue <a class="postlink" href="https://github.com/aspnet/EntityFrameworkCore/issues/7030">https://github.com/aspnet/EntityFramewo ... ssues/7030</a>. Can you check ?

    Configuyring the related field like below should fix the problem;

    entity.Property(e => e.Property).IsUnicode(false);
    
  • User Avatar
    0
    squaresunion created

    Hello, you saying entity.Property(e => e.Property).IsUnicode(false); to the related field? But which related field? I dont even know what the error is related to...

  • User Avatar
    0
    ismcagdas created
    Support Team

    @SquaresUnion is it possible to share your project with us ? I just tried and all tests passed in AspNet Zero. So, I assume it is one of your entities causing this problem.