Package org.apache.solr.common.util
Class CommonTestInjection.BreakpointSetter
- java.lang.Object
- 
- org.apache.solr.common.util.CommonTestInjection.BreakpointSetter
 
- 
- All Implemented Interfaces:
- Closeable,- AutoCloseable
 - Enclosing class:
- CommonTestInjection
 
 public static class CommonTestInjection.BreakpointSetter extends Object implements Closeable Breakpoints should be set via thisCommonTestInjection.BreakpointSetterwithin the test case and close should be invoked as cleanup. Since this is closeable, it should usually be used in the try-with-resource syntax, such as:try (BreakpointSetter breakpointSetter = new BreakpointSetter() { //... test code here that calls breakpointSetter.setImplementation(...) }
- 
- 
Constructor SummaryConstructors Constructor Description BreakpointSetter()
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()voidsetImplementation(String key, CommonTestInjection.Breakpoint implementation)This is usually set by the test cases.
 
- 
- 
- 
Method Detail- 
setImplementationpublic void setImplementation(String key, CommonTestInjection.Breakpoint implementation) This is usually set by the test cases.If a breakpoint implementation is set by this method, then code execution would break at the code execution point marked by CommonTestInjection#injectBreakpoint with matching key, executes the provided implementation in the CommonTestInjection.Breakpoint, then resumes the normal code execution.- Parameters:
- key- could simply be the fully qualified class name or more granular like class name + other id (such as method name). This should batch the key used in injectBreakpoint
- implementation- The Breakpoint implementation
- See Also:
- CommonTestInjection.injectBreakpoint(String, Object...)
 
 - 
closepublic void close() throws IOException- Specified by:
- closein interface- AutoCloseable
- Specified by:
- closein interface- Closeable
- Throws:
- IOException
 
 
- 
 
-