Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_017ic4b6R1spapM7nBteaqeo
20 lines
612 B
Java
20 lines
612 B
Java
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();
|
|
}
|