Files
yatm/internal/executor/restore/settings_test.go
T
Samuel Cui 4fef653b71 Prepare YATM v1.0.0-alpha.2
Unify file queries and Scan execution, retain indexed Identical results,
improve Job and Preview workflows, and verify release packaging.
2026-10-05 19:08:49 +08:00

23 lines
778 B
Go

package restore
import (
"testing"
"time"
"github.com/samuelncui/yatm/entity"
"github.com/stretchr/testify/require"
)
func TestRestoreExecutionSettingsMapToACPOptions(t *testing.T) {
// Every Job execution setting maps onto the manifest page size or one ACP option: the read
// buffer, the result queue, the result batch and the result flush interval.
settings := executionSettingsFrom(&entity.JobExecutionSettings{
ReadBatch: 4, ReadBufferMax: 16, WriteBufferMax: 8, WriteBatchSize: 4, FlushIntervalMs: 500,
})
require.Equal(t, 4, settings.BatchSize)
require.Equal(t, 16, settings.ReadBufferMax)
require.Equal(t, 8, settings.ResultBufferMax)
require.Equal(t, 4, settings.ResultBatchSize)
require.Equal(t, 500*time.Millisecond, settings.ResultFlushInterval)
}