#1 Re: mORMot 2 » mormot2tests.exe - EWinHttp test failure » 2025-05-03 08:26:30

Hello Administrator,

Thanks for your reply and the link to the test cases that all passed tonight.

Here is the summary of my tests:

Software version tested: 2.3.10853 (2025-05-02 16:33:03)

Windows 11 64bit 23H2 (10.0.22631.5189) [utf8 2.6GB 58671B01]
    2 x Intel(R) Core(TM) i7-14700 [33MB] (x86)
    on Microsoft Corporation Virtual Machine Hyper-V UEFI Release v4.1
Using mORMot 2.3.10853 2 May 2025
    TSqlite3LibraryStatic 3.46.1 with internal MM
Generated with: Free Pascal 3.2.3 32 bit Win compiler

Time elapsed for all tests: 1m21
Performed 3 May 2025, 18:19:37 by Mathias on WINDOWS-11

Total assertions failed for all test suits:  16 / 128,942,310
! Some tests FAILED: please correct the code.

The test cases that failed are:

0000000000000000  ! rotat mormot2tests 2.3.10853 TSynLog 2.3.10853 {2 15.05 12.35 1.8GB/2.6GB 58671b01}
0000000000000010  ! fail  Catalog: #3012 <>0123456789012345012345678901234 asym ctr mormot2tests.dpr  (200) mormot2tests.dpr  (200) mormot2tests.dpr  (200) mormot2tests.dpr  (200) mormot2tests.dpr  (200) test.core.crypt.pas  (3189) mormot2tests.dpr  (200) test.core.crypt.pas  (3601) mormot2tests.dpr  (200) mormot2tests.dpr  (143) mormot2tests.dpr  (200) mormot2tests.dpr  (193)
0000000000001219  ! fail  Catalog: #3013 <>0123456789012345012345678901234 another padding mormot2tests.dpr  (200) mormot2tests.dpr  (200) mormot2tests.dpr  (200) mormot2tests.dpr  (200) mormot2tests.dpr  (200) test.core.crypt.pas  (3190) mormot2tests.dpr  (200) test.core.crypt.pas  (3601) mormot2tests.dpr  (200) mormot2tests.dpr  (143) mormot2tests.dpr  (200) mormot2tests.dpr  (193)
00000000003A2242  ! fail  Catalog: #3368 <>0123456789012345012345678901234 asym ctr mormot2tests.dpr  (200) mormot2tests.dpr  (200) mormot2tests.dpr  (200) mormot2tests.dpr  (200) mormot2tests.dpr  (200) test.core.crypt.pas  (3189) mormot2tests.dpr  (200) test.core.crypt.pas  (3601) mormot2tests.dpr  (200) mormot2tests.dpr  (143) mormot2tests.dpr  (200) mormot2tests.dpr  (193)
00000000003A24C0  ! fail  Catalog: #3369 <>0123456789012345012345678901234 another padding mormot2tests.dpr  (200) mormot2tests.dpr  (200) mormot2tests.dpr  (200) mormot2tests.dpr  (200) mormot2tests.dpr  (200) test.core.crypt.pas  (3190) mormot2tests.dpr  (200) test.core.crypt.pas  (3601) mormot2tests.dpr  (200) mormot2tests.dpr  (143) mormot2tests.dpr  (200) mormot2tests.dpr  (193)
000000000078F777  ! fail  Catalog: #4080 <>0123456789012345012345678901234 asym ctr mormot2tests.dpr  (200) mormot2tests.dpr  (200) mormot2tests.dpr  (200) mormot2tests.dpr  (200) mormot2tests.dpr  (200) test.core.crypt.pas  (3189) mormot2tests.dpr  (200) test.core.crypt.pas  (3601) mormot2tests.dpr  (200) mormot2tests.dpr  (143) mormot2tests.dpr  (200) mormot2tests.dpr  (193)
000000000078F9D3  ! fail  Catalog: #4081 <>0123456789012345012345678901234 another padding mormot2tests.dpr  (200) mormot2tests.dpr  (200) mormot2tests.dpr  (200) mormot2tests.dpr  (200) mormot2tests.dpr  (200) test.core.crypt.pas  (3190) mormot2tests.dpr  (200) test.core.crypt.pas  (3601) mormot2tests.dpr  (200) mormot2tests.dpr  (143) mormot2tests.dpr  (200) mormot2tests.dpr  (193)
0000000000CD0E0C  ! fail  Catalog: #4436 <>0123456789012345012345678901234 asym ctr mormot2tests.dpr  (200) mormot2tests.dpr  (200) mormot2tests.dpr  (200) mormot2tests.dpr  (200) mormot2tests.dpr  (200) test.core.crypt.pas  (3189) mormot2tests.dpr  (200) test.core.crypt.pas  (3601) mormot2tests.dpr  (200) mormot2tests.dpr  (143) mormot2tests.dpr  (200) mormot2tests.dpr  (193)
0000000000CD0F7C  ! fail  Catalog: #4437 <>0123456789012345012345678901234 another padding mormot2tests.dpr  (200) mormot2tests.dpr  (200) mormot2tests.dpr  (200) mormot2tests.dpr  (200) mormot2tests.dpr  (200) test.core.crypt.pas  (3190) mormot2tests.dpr  (200) test.core.crypt.pas  (3601) mormot2tests.dpr  (200) mormot2tests.dpr  (143) mormot2tests.dpr  (200) mormot2tests.dpr  (193)
00000000011288DA  ! fail  Catalog: #4792 <>0123456789012345012345678901234 asym ctr mormot2tests.dpr  (200) mormot2tests.dpr  (200) mormot2tests.dpr  (200) mormot2tests.dpr  (200) mormot2tests.dpr  (200) test.core.crypt.pas  (3189) mormot2tests.dpr  (200) test.core.crypt.pas  (3601) mormot2tests.dpr  (200) mormot2tests.dpr  (143) mormot2tests.dpr  (200) mormot2tests.dpr  (193)
0000000001128AF6  ! fail  Catalog: #4793 <>0123456789012345012345678901234 another padding mormot2tests.dpr  (200) mormot2tests.dpr  (200) mormot2tests.dpr  (200) mormot2tests.dpr  (200) mormot2tests.dpr  (200) test.core.crypt.pas  (3190) mormot2tests.dpr  (200) test.core.crypt.pas  (3601) mormot2tests.dpr  (200) mormot2tests.dpr  (143) mormot2tests.dpr  (200) mormot2tests.dpr  (193)
00000000015E075D  ! fail  Catalog: #5148 <>0123456789012345012345678901234 asym ctr mormot2tests.dpr  (200) mormot2tests.dpr  (200) mormot2tests.dpr  (200) mormot2tests.dpr  (200) mormot2tests.dpr  (200) test.core.crypt.pas  (3189) mormot2tests.dpr  (200) test.core.crypt.pas  (3601) mormot2tests.dpr  (200) mormot2tests.dpr  (143) mormot2tests.dpr  (200) mormot2tests.dpr  (193)
00000000015E09E3  ! fail  Catalog: #5149 <>0123456789012345012345678901234 another padding mormot2tests.dpr  (200) mormot2tests.dpr  (200) mormot2tests.dpr  (200) mormot2tests.dpr  (200) mormot2tests.dpr  (200) test.core.crypt.pas  (3190) mormot2tests.dpr  (200) test.core.crypt.pas  (3601) mormot2tests.dpr  (200) mormot2tests.dpr  (143) mormot2tests.dpr  (200) mormot2tests.dpr  (193)
0000000001AE377C  ! fail  Catalog: #5504 <>0123456789012345012345678901234 asym ctr mormot2tests.dpr  (200) mormot2tests.dpr  (200) mormot2tests.dpr  (200) mormot2tests.dpr  (200) mormot2tests.dpr  (200) test.core.crypt.pas  (3189) mormot2tests.dpr  (200) test.core.crypt.pas  (3601) mormot2tests.dpr  (200) mormot2tests.dpr  (143) mormot2tests.dpr  (200) mormot2tests.dpr  (193)
0000000001AE3A48  ! fail  Catalog: #5505 <>0123456789012345012345678901234 another padding mormot2tests.dpr  (200) mormot2tests.dpr  (200) mormot2tests.dpr  (200) mormot2tests.dpr  (200) mormot2tests.dpr  (200) test.core.crypt.pas  (3190) mormot2tests.dpr  (200) test.core.crypt.pas  (3601) mormot2tests.dpr  (200) mormot2tests.dpr  (143) mormot2tests.dpr  (200) mormot2tests.dpr  (193)
0000000001E8C09A  ! fail  Catalog: #5860 <>0123456789012345012345678901234 asym ctr mormot2tests.dpr  (200) mormot2tests.dpr  (200) mormot2tests.dpr  (200) mormot2tests.dpr  (200) mormot2tests.dpr  (200) test.core.crypt.pas  (3189) mormot2tests.dpr  (200) test.core.crypt.pas  (3601) mormot2tests.dpr  (200) mormot2tests.dpr  (143) mormot2tests.dpr  (200) mormot2tests.dpr  (193)
0000000001E8C329  ! fail  Catalog: #5861 <>0123456789012345012345678901234 another padding mormot2tests.dpr  (200) mormot2tests.dpr  (200) mormot2tests.dpr  (200) mormot2tests.dpr  (200) mormot2tests.dpr  (200) test.core.crypt.pas  (3190) mormot2tests.dpr  (200) test.core.crypt.pas  (3601) mormot2tests.dpr  (200) mormot2tests.dpr  (143) mormot2tests.dpr  (200) mormot2tests.dpr  (193)
00000000033038FE  ! EXCOS EExternalException (e06d7363) [Main] at 76b1dba2  {2 24.54 8.60 1.8GB/2.6GB 58671b01}

Is there anyone out here in the community, who is using Lazarus & FPC on a Hyper-V machine and has his/her test cases passing altogether? Could it be a problem of how Hyper-V "simulates" another computer?

Thanks for a short answer in advance.

Salut,
  Mathias

#2 Re: mORMot 2 » mormot2tests.exe - EWinHttp test failure » 2025-05-02 06:50:22

Hello Administrator,

finally I had some time to install Lazarus 3.6 and FPC 3.2.3 with the help of FPCUpDeluxe.

Now all the DNS and LDAP test cases passed that previously failed. There are 16 test cases left in 1.4. Core crypto (test.core.crypt.pas) that fail. For example:

fail  Catalog: #3012 <>0123456789012345012345678901234 asym ctr 
mormot2tests.dpr  (200) 
mormot2tests.dpr  (200) 
mormot2tests.dpr  (200) 
mormot2tests.dpr  (200) 
mormot2tests.dpr  (200) 
test.core.crypt.pas  (3189) 
mormot2tests.dpr  (200) 
test.core.crypt.pas  (3601) 
mormot2tests.dpr  (200) 
mormot2tests.dpr  (143) 
mormot2tests.dpr  (200) 
mormot2tests.dpr  (193)

Shouldn't they pass too? Is there anything else I need to do to my Lazarus environment?

Thanks for as short answer in advance.

Salut,
  Mathias

#3 Re: mORMot 2 » mormot2tests.exe - EWinHttp test failure » 2025-04-21 10:16:09

Thanks for your reply, Administrator.

I will upgrade to FPC 3.2.3 and downgrade to Lazarus 2.2.5 tomorrow (late here in Sydney) and see if it fixes the problem. I shall also update the clone of the mORMot2 repo.

Salut,
  Mathias

#4 Re: mORMot 2 » mormot2tests.exe - EWinHttp test failure » 2025-04-21 08:47:24

Hello Administrator,

yes, the virtual machine has Internet access.

I increased the CPU cores from 1 to 2, recompiled the project and ran it once more in an admin command prompt. Here is the result:

Software version tested: 2.3.10754 (2025-04-21 18:31:10)

Windows 11 64bit 23H2 (10.0.22631.5189) [utf8 5GB 58671B01]
    2 x Intel(R) Core(TM) i7-14700 [33MB] (x64)
    on Microsoft Corporation Virtual Machine Hyper-V UEFI Release v4.1
Using mORMot 2.3.10754 21 Apr 2025
    TSqlite3LibraryStatic 3.46.1 with internal MM
Generated with: Free Pascal 3.2.2 64 bit Win compiler

Time elapsed for all tests: 52.60s
Performed 21 Apr 2025, 18:32:30 by Mathias on WINDOWS-11

Total assertions failed for all test suits:  18,539 / 128,819,604
! Some tests FAILED: please correct the code.

This is the first error in the test suite:

! Core process - TDocVariant
! Exception ESynVariant at 01000726b5 ../../src/core/mormot.core.base.asmx64.inc  (2974): 
2025-04-21 08:31:41 [TDocVariant.DispInvoke: invalid (1) call]

I also have 16 failures in the 1.4. Core crypto. There it starts with

Catalog: #3012 <>0123456789012345012345678901234 asym ctr  
Catalog: #3013 <>0123456789012345012345678901234 another padding
...

And under 1.7. Network protocols I can see that the DNS & LDA tests fail:

DNS and LDAP: #31 blog.synopse.info<>62-210-254-173.rev.poneytelecom.eu   !  
- DNS and LDAP: 1 / 3,716 FAILED  2.33s
time.google.com : 2025-04-21 08:32:02.527Z = 2025-04-21 08:32:02.430Z

The Hyper-V machine works with a Default Switch and has an internal IP address of 172.22.254.247 with a default gateway of 172.22.240.1.

Any ideas what is wrong? Shall I try to run it once more in an Oracle VirtualBox machine?

Salut,
  Mathias

#5 mORMot 2 » mormot2tests.exe - EWinHttp test failure » 2025-04-20 22:18:45

mathias_burbach
Replies: 9

Hello Folks!

I just installed FPC Version 3.2.2 & Lazarus 3.6 in a Windows 11 Hyper-V machine. I installed the mORMot2 packages for Lazarus, compiled the test project and ran it in a command prompt with admin rights.

Most of the tests passed:

Total assertions failed for all test suits:  18,539 / 128,814,939
! Some tests FAILED: please correct the code.

The first test case that fails is:

EWinHttp {Message:"winhttp.dll error [The server name or address could not be resolved] (0x2EE7)"} 
[Main] at 0100046fab ../../src/core/mormot.core.base.asmx64.inc  
(2974)  {1 26.90 13.72 1.8GB/2.5GB 58671b01}

This is followed by many failures on

  • Soa callback on server side

  • Soa callback via json websockets

  • Soa callback via binary websockets

  • Relay soa callback via json websockets

  • Relay soa callback via binary websockets

What needs to be amended in mormot.core.base.asmx64.inc ?

Thanks for a short answer in advance.

Salut,
  Mathias

#6 Re: mORMot 2 » Moving to mORMot2 for multi-tier application » 2025-03-27 07:15:30

Merci beaucoup, Arnaud. wink

The TRestBatch is exactly the equivalent to what we are used to in DataSnap world, including the MaxErrors parameter. smile

What about nested classes, so changes against a TCustomer with multiple TOrder instances (e.g. TCustomer.Orders: TOrderList) and several TOrderItem(s) (e.g. TOrder.Items: TOrderItemList)? Is RTTI enough to handle this or do we need to add each changed TOrmClass descendent into the batch, one by one? Can a batch contain different TOrmClass descendents? If so, is the client responsible for the correct order of the batch? For example new customers first before orders for a new customer and deleted orders first before deleting a customer? The TClientDataSet kept track of the >>change order<< for us and applied them in the same sequence on the server-side.

Is there any better option than loading all data again after a TRestClient.BatchSend, if the server has to enhance the batch (e.g. Adding a primary key value, setting a version number on the TOrmClass descendent or enhancing the batch in any other form or shape)? This TDataSetProvider.Options = [poPropogateChanges, ...] with zero lines of code on the client-side was quite helpful in DataSnap.

Thanks for your additional feedback up-front.

Salut, Mathias

#7 mORMot 2 » Moving to mORMot2 for multi-tier application » 2025-03-26 09:52:08

mathias_burbach
Replies: 3

Dear mORMot2 user base,

we are considering to use mORMot2 for a new project that will need an application server and a Delphi VCL front-end. In previous projects we have used DataSnap.

I had a look at the examples of mORMot2 and wanted to understand how the blog application saves a new post. I was surprised to see that each article was is sent to the server as a set of parameters instead of a model instance (e.g. TOrmArticle). Is the serialisation able to sent a complete model instance maybe even with dependent model classes? I ask this as we previously have implemented multi-step wizards using nested datasets with all sorts of changes on any given step (e.g. nested dataset). We would like to reproduce this behaviour as all changes need to be done within one database transaction.

Last but not least we would need to know if any changes done to the model class on the server-side as part of a Wizard.SaveChanges (like TBlogApplication.ArticleCommit) can be transported back to the client and merged into the client-side representation of the model without too much hassle? In DataSnap we only had to enable the propagation of changes done to the delta inside a dataset provider events and those changes would travel back to the client without the need of fetching the model/dataset again (e.g. TDataSetProvider.Options = [poPropogateChanges, ...]).

We are looking forward to your advice and hope to find a smooth path from DataSnap to mORMot2. smile

Salut, Mathias

#8 Re: mORMot 1 » Some basic questions » 2020-07-17 02:00:16

Dear Administrator,

a pessimistic lock as suggested by Bernd is one option. I can understand that you do not want to implement that feature for a stateless server.

But what about optimistic locking? I am studying mORMot to decide if my next project will be done with mORMot instead of DataSnap and TClientDataSets. So far I have had a version number on each record that was incremented by the application server. The primary key value and the version number of the record was good enough to identify if the record changed since the client-side fetched the record. Obviously the server had to increment the version number and that change on the record was transported back into the client without a single line of code. Just by including the poPropogateChanges into the TDataSetProvider.Options any server-side change was transported back into the client.

I thought that TModTime would be something similar as I looked at the mORMot documentation. But in the sample project 03 NamedPipe the value is assigned on the client-side. Even if there is a chance to get this done on the server-side I would still need other properties to be updated on the server-side before they are saved in the database and that change would have to go back into the client-side without too much effort. What is the best way to achieve that with mORMot?

A sample on how TMS Aurelius handles such situations can be found here.

Salut,
  Mathias

Board footer

Powered by FluxBB