mirror of
https://github.com/ONLYOFFICE/server.git
synced 2026-02-10 18:05:07 +08:00
[bug] Fix sql for oracle NCLOB type; Fix bug 77666
This commit is contained in:
@ -210,7 +210,14 @@ afterAll(async () => {
|
||||
const updateIfIds = Object.values(updateIfCases);
|
||||
|
||||
const tableChangesIds = [...emptyCallbacksCase, ...documentsWithChangesCase, ...changesIds, ...insertIds];
|
||||
const tableResultIds = [...emptyCallbacksCase, ...documentsWithChangesCase, ...getExpiredCase, ...getCountWithStatusCase, ...upsertIds, ...updateIfIds];
|
||||
const tableResultIds = [
|
||||
...emptyCallbacksCase,
|
||||
...documentsWithChangesCase,
|
||||
...getExpiredCase,
|
||||
...getCountWithStatusCase,
|
||||
...upsertIds,
|
||||
...updateIfIds
|
||||
];
|
||||
|
||||
const deletionPool = [
|
||||
deleteRowsByIds(cfgTableChanges, tableChangesIds),
|
||||
@ -292,17 +299,23 @@ describe('Base database connector', () => {
|
||||
|
||||
describe('Add changes', () => {
|
||||
for (const testCase in insertCases) {
|
||||
test(`${testCase} rows inserted`, async () => {
|
||||
const docId = insertCases[testCase];
|
||||
const objChanges = createChanges(+testCase, date);
|
||||
// Increase timeout for large inserts (5000+ rows can take longer on some databases)
|
||||
const timeout = +testCase >= 5000 ? 15000 : 5000;
|
||||
test(
|
||||
`${testCase} rows inserted`,
|
||||
async () => {
|
||||
const docId = insertCases[testCase];
|
||||
const objChanges = createChanges(+testCase, date);
|
||||
|
||||
await noRowsExistenceCheck(cfgTableChanges, docId);
|
||||
await noRowsExistenceCheck(cfgTableChanges, docId);
|
||||
|
||||
await baseConnector.insertChangesPromise(ctx, objChanges, docId, index, user);
|
||||
const result = await getRowsCountById(cfgTableChanges, docId);
|
||||
await baseConnector.insertChangesPromise(ctx, objChanges, docId, index, user);
|
||||
const result = await getRowsCountById(cfgTableChanges, docId);
|
||||
|
||||
expect(result).toEqual(objChanges.length);
|
||||
});
|
||||
expect(result).toEqual(objChanges.length);
|
||||
},
|
||||
timeout
|
||||
);
|
||||
}
|
||||
});
|
||||
|
||||
@ -482,10 +495,7 @@ describe('Base database connector', () => {
|
||||
const taskEmptyCallback = createTask(updateIfCases.emptyCallback, '');
|
||||
|
||||
// Insert two rows: one with callback, one without
|
||||
await Promise.all([
|
||||
insertIntoResultTable(date, taskWithCallback),
|
||||
insertIntoResultTable(date, taskEmptyCallback)
|
||||
]);
|
||||
await Promise.all([insertIntoResultTable(date, taskWithCallback), insertIntoResultTable(date, taskEmptyCallback)]);
|
||||
|
||||
// Update mask: only update rows with non-empty callback and status=None
|
||||
const mask = new taskResult.TaskResultData();
|
||||
|
||||
Reference in New Issue
Block a user