package com.ankurm.nplusone; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; import org.junit.jupiter.api.extension.ExtendWith; /** * Query budget for one test: the test fails if it sends more than {@link #value()} SELECT statements. * Put it on a method, or on the class to apply the same budget to every test in it. */ @Target({ ElementType.METHOD, ElementType.TYPE }) @Retention(RetentionPolicy.RUNTIME) @ExtendWith(QueryGuardExtension.class) public @interface MaxSelects { int value(); }