diff --git a/plugins/catalog-backend/src/database/operations/stitcher/syncSearchRows.test.ts b/plugins/catalog-backend/src/database/operations/stitcher/syncSearchRows.test.ts index 6981af177b..5a46608e7d 100644 --- a/plugins/catalog-backend/src/database/operations/stitcher/syncSearchRows.test.ts +++ b/plugins/catalog-backend/src/database/operations/stitcher/syncSearchRows.test.ts @@ -225,26 +225,6 @@ describe.each(databases.eachSupportedId())('syncSearchRows, %p', databaseId => { expect(rows.map(r => r.value).sort()).toEqual(['java', 'python', 'rust']); }); - it('silently rejects a direct duplicate insert via the UNIQUE constraint', async () => { - await syncSearchRows(knex, 'e1', [row('a', 'x'), row('b', 'y')]); - - // Simulate a concurrent process inserting a duplicate directly — - // the UNIQUE constraint on (entity_id, key, value) should reject it - // silently. ON CONFLICT without a column list covers any unique - // constraint on the table, which is safe since (entity_id, key, value) - // is the only one. - await knex('search') - .insert({ entity_id: 'e1', key: 'a', value: 'x', original_value: 'x' }) - .onConflict() - .ignore(); - - const rows = await getSearchRows(); - expect(rows).toHaveLength(2); - expect(rows.find(r => r.key === 'a')).toEqual( - expect.objectContaining({ key: 'a', value: 'x' }), - ); - }); - it('restores original_value when re-syncing after it was corrupted', async () => { await syncSearchRows(knex, 'e1', [row('a', 'x', 'X')]);