Skip to content

Commit

Permalink
CAMEL-19986: created throttling executor in camel-test
Browse files Browse the repository at this point in the history
  • Loading branch information
LostArtist committed Oct 25, 2023
1 parent 24bf0f5 commit 372524d
Showing 1 changed file with 14 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ public static ValueBuilder systemProperty(String name, String defaultValue) {
public static <T> T assertIsInstanceOf(Class<T> expectedType, Object value) {
assertNotNull(value, "Expected an instance of type: " + expectedType.getName() + " but was null");
assertTrue(expectedType.isInstance(value), "Object should be of type " + expectedType.getName() + " but was: " + value
+ " with the type: " + value.getClass().getName());
+ " with the type: " + value.getClass().getName());
return expectedType.cast(value);
}

Expand Down Expand Up @@ -426,8 +426,8 @@ public static List<Route> getRouteList(RouteBuilder builder) throws Exception {
* Recursively delete a directory, useful to zapping test data. Deletion will be attempted up to five time before
* giving up.
*
* @param file the directory to be deleted
* @return <tt>false</tt> when an error occur while deleting directory
* @param file the directory to be deleted
* @return <tt>false</tt> when an error occur while deleting directory
*/
public static boolean deleteDirectory(Path file) {
return deleteDirectory(file.toFile());
Expand All @@ -437,8 +437,8 @@ public static boolean deleteDirectory(Path file) {
* Recursively delete a directory, useful to zapping test data. Deletion will be attempted up to five time before
* giving up.
*
* @param file the directory to be deleted
* @return <tt>false</tt> when an error occur while deleting directory
* @param file the directory to be deleted
* @return <tt>false</tt> when an error occur while deleting directory
*/
public static boolean deleteDirectory(String file) {
return deleteDirectory(new File(file));
Expand All @@ -448,8 +448,8 @@ public static boolean deleteDirectory(String file) {
* Recursively delete a directory, useful to zapping test data. Deletion will be attempted up to five time before
* giving up.
*
* @param file the directory to be deleted
* @return <tt>false</tt> when an error occur while deleting directory
* @param file the directory to be deleted
* @return <tt>false</tt> when an error occur while deleting directory
*/
public static boolean deleteDirectory(File file) {
int tries = 0;
Expand Down Expand Up @@ -527,9 +527,9 @@ public static void createDirectory(String file) {
* <p/>
* Uses <tt>os.name</tt> from the system properties to determine the Operating System.
*
* @param expectedPlatform such as Windows
* @return <tt>true</tt> when the current Operating System is the expected platform, <tt>false</tt>
* otherwise.
* @param expectedPlatform such as Windows
* @return <tt>true</tt> when the current Operating System is the expected platform, <tt>false</tt>
* otherwise.
*/
public static boolean isPlatform(String expectedPlatform) {
String osName = System.getProperty("os.name").toLowerCase(Locale.US);
Expand All @@ -541,9 +541,9 @@ public static boolean isPlatform(String expectedPlatform) {
* <p/>
* Uses <tt>java.vendor</tt> from the system properties to determine the vendor.
*
* @param expectedVendor such as IBM
* @return <tt>true</tt> when the current Java Virtual Machine has been issued by the expected
* vendor, <tt>false</tt> otherwise.
* @param expectedVendor such as IBM
* @return <tt>true</tt> when the current Java Virtual Machine has been issued by the expected
* vendor, <tt>false</tt> otherwise.
*/
public static boolean isJavaVendor(String expectedVendor) {
String javaVendor = System.getProperty("java.vendor").toLowerCase(Locale.US);
Expand Down Expand Up @@ -572,7 +572,7 @@ public static boolean isCamelDebugPresent() {
return Thread.currentThread()
.getContextClassLoader()
.getResource(String.format("%s%s", FactoryFinder.DEFAULT_PATH, Debugger.FACTORY))
!= null;
!= null;
}

public static String fileUri(Path testDirectory) {
Expand Down

0 comments on commit 372524d

Please sign in to comment.