View Issue Details

IDProjectCategoryView StatusLast Update
0010603Talermerchant backendpublic2025-11-15 12:59
ReporterBohdan Assigned Tooec  
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionwon't fix 
Product Version1.0 
Target Version1.2Fixed in Version1.2 
Summary0010603: Test fails on the merchant suite because of the oid mismatch
DescriptionThe problem is next merchant test fails, if before were run tests on the exchange.

With the next logs
2025-11-11T21:13:25.290765+0100 taler-merchant-httpd-1112031(5GN4J7PD6P8DXY1R8SHDKCKQFC) ERROR Assertion failed at pq_result_helper.c:1203. (which is FAIL_IF (info->oid != header.oid);)
2025-11-11T21:13:25.290780+0100 taler-merchant-httpd-1112031(5GN4J7PD6P8DXY1R8SHDKCKQFC) ERROR Failed to extract field `price_array'
2025-11-11T21:13:25.290790+0100 taler-merchant-httpd-1112031(5GN4J7PD6P8DXY1R8SHDKCKQFC) ERROR Assertion failed at pq.c:194.
2025-11-11T21:13:25.290799+0100 taler-merchant-httpd-1112031(5GN4J7PD6P8DXY1R8SHDKCKQFC) ERROR Assertion failed at taler-merchant-httpd_private-get-products-ID.c:57.

Yet the tests will pass if no tests on the exchange side were run...
Steps To Reproduce1. Get master of exchange git, make install && make check
2. Get dev/bohdan-potuzhnyi/update-inventory-logic of merchant make install && make check (here tests will fail)
3. Dropdb talercheck && createdb talercheck
4. Run merchant tests one more time (here they pass)
5. Run exchange tests (also all good)
6. Run merchant tests (here they fail)
Additional InformationDear OEC,

C told me that you can help me with the next problem, as you might have experience with something similar

So would be really grateful if you could tell how it might be fixed, or what the problem is.
As I believe this problem is the last thing that limits me from putting the new features into to master branch
TagsNo tags attached.

Activities

oec

2025-11-14 10:56

developer   ~0026434

With current master of gnunet, exchange, libeufin, wallet-core and your merchant branch,
I can not reproduce the issue:

1. merchant: `make check` in `src/testing`:
```
============================================================================
Testsuite summary for taler-merchant 1.1.0
============================================================================
# TOTAL: 17
# PASS: 16
# SKIP: 1
# XFAIL: 0
# FAIL: 0
# XPASS: 0
# ERROR: 0
============================================================================
```

2. exchange: `make check` in `src/testing`:
```
============================================================================
Testsuite summary for taler-exchange 1.1.4
============================================================================
# TOTAL: 24
# PASS: 23
# SKIP: 1
# XFAIL: 0
# FAIL: 0
# XPASS: 0
# ERROR: 0
============================================================================
```

3. merchant: `make check` in `src/testing`:
```
============================================================================
Testsuite summary for taler-merchant 1.1.0
============================================================================
# TOTAL: 17
# PASS: 16
# SKIP: 1
# XFAIL: 0
# FAIL: 0
# XPASS: 0
# ERROR: 0
============================================================================
```

In both repos, the config for the tests refer to `postgres:///talercheck` as their database.

oec

2025-11-15 11:26

developer   ~0026458

It turns out that the issue is in GNUNET: The oid-retrieval logic is not schema aware. The problem arose because the merchant sql code introduces a type `taler_amount_currency`, into schema `merchant`, but the test code in exchange:src/lib/pq also introduces that type, but in the `public` schema. Consecutive tests of merchant, exchange, merchant, finally led to inconsistencies between the oid written during the first insert, and the expected oid _after_ also exchange tests were run.

A patch for GNUNET is available here: https://git.gnunet.org/gnunet.git/commit/?h=dev/oec/pq. It should soon be merged.

Issue History

Date Modified Username Field Change
2025-11-13 10:26 Bohdan New Issue
2025-11-13 10:26 Bohdan Status new => assigned
2025-11-13 10:26 Bohdan Assigned To => oec
2025-11-14 10:56 oec Status assigned => feedback
2025-11-14 10:56 oec Note Added: 0026434
2025-11-15 11:26 oec Status feedback => resolved
2025-11-15 11:26 oec Resolution open => won't fix
2025-11-15 11:26 oec Note Added: 0026458
2025-11-15 12:59 Christian Grothoff Product Version git (master) => 1.0
2025-11-15 12:59 Christian Grothoff Fixed in Version => 1.2
2025-11-15 12:59 Christian Grothoff Target Version 1.3 => 1.2