The problem is, after an update request/endpoint, seems like if we create a new DB connection to fetch the data, we have a probability to get stale data, NOTE it is not for sure the data is stale, just sometimes it happens, like 50% probability. If we WAIT for a while, the data is correct.
https://github.com/dadiorchen/treetracker-token-trading-api/blob/1b00682cd294d0e9ad0e44dce73c33a81b8e48c1/__tests__/integration/impact-value-transfer.spec.js#L47-L63
The problem is, after an
updaterequest/endpoint, seems like if we create a new DB connection to fetch the data, we have a probability to get stale data, NOTE it is not for sure the data is stale, just sometimes it happens, like 50% probability. If we WAIT for a while, the data is correct.https://github.com/dadiorchen/treetracker-token-trading-api/blob/1b00682cd294d0e9ad0e44dce73c33a81b8e48c1/__tests__/integration/impact-value-transfer.spec.js#L47-L63