Ejemplo n.º 1
0
        private async ValueTask TestDriver(TestUtils.AllocatorType allocatorType, [Values] bool isAsync)
        {
            ValueTask task;

            switch (allocatorType)
            {
            case TestUtils.AllocatorType.FixedBlittable:
                task = RunTest <long>(Populate, Read, Recover, isAsync);
                break;

            case TestUtils.AllocatorType.VarLenBlittable:
                this.varLenStructObj = new VLValue();
                task = RunTest <VLValue>(Populate, Read, Recover, isAsync);
                break;

            case TestUtils.AllocatorType.Generic:
                this.serializerSettingsObj = new MyValueSerializer();
                task = RunTest <MyValue>(Populate, Read, Recover, isAsync);
                break;

            default:
                throw new ApplicationException("Unknown allocator type");
            }
            ;
            await task;
        }
Ejemplo n.º 2
0
 public async ValueTask RecoveryTestFailOnSectorSize([Values] TestUtils.AllocatorType allocatorType, [Values] bool isAsync)
 {
     this.smallSector = true;
     await TestDriver(allocatorType, isAsync);
 }
Ejemplo n.º 3
0
 public async ValueTask RecoveryTestByAllocatorType([Values] TestUtils.AllocatorType allocatorType, [Values] bool isAsync)
 {
     await TestDriver(allocatorType, isAsync);
 }