Skip to content

Commit 462668b

Browse files
committed
fix few typos
1 parent 2deefc6 commit 462668b

File tree

17 files changed

+47
-47
lines changed

17 files changed

+47
-47
lines changed

CHANGES.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1322,7 +1322,7 @@ Added: comand line support for setting parallel mode, suite and test names
13221322
Eclipse plug-in
13231323
Added: Support for configuring per project usedefaultlisteners
13241324
Added: Contextual drop-down menu on failures tab of the TestNG view to enable running/debugging method failure only
1325-
Added: Suppport for configuring per project TestNG jar usage (project provided one or plugin provided one)
1325+
Added: Support for configuring per project TestNG jar usage (project provided one or plugin provided one)
13261326

13271327
===========================================================================
13281328
5.2

testng-core-api/src/main/java/org/testng/IConfigurationListener2.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package org.testng;
22

3-
// WARNING: Donot delete this interface. This is internally being referred to by Gradle here
3+
// WARNING: Do not delete this interface. This is internally being referred to by Gradle here
44
// https://github.com/gradle/gradle/blob/f0b9d60906c7b8c42cd6c61a39ae7b74767bb012/subprojects/testing-jvm/src/main/java/org/gradle/api/internal/tasks/testing/testng/TestNGListenerAdapterFactory.java#L37-L49
55
/** @deprecated As of release 7.0.0, replaced by {@link org.testng.IConfigurationListener} */
66
@Deprecated

testng-core-api/src/main/java/org/testng/Reporter.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ private static synchronized void log(String s, ITestResult m) {
7575
}
7676

7777
if (m == null) {
78-
// Persist the output temporarily into a Threadlocal String list.
78+
// Persist the output temporarily into a ThreadLocal String list.
7979
if (m_orphanedOutput.get() == null) {
8080
m_orphanedOutput.set(new ArrayList<>());
8181
}

testng-core-api/src/main/java/org/testng/annotations/AfterSuite.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,9 +72,9 @@
7272

7373
/**
7474
* The maximum number of milliseconds this method should take. If it hasn't returned after this
75-
* time, this method will fail and it will cause test methods depending on it to be skipped.
75+
* time, this method will fail, and it will cause test methods depending on it to be skipped.
7676
*
77-
* @return the valude (default 0)
77+
* @return the value (default 0)
7878
*/
7979
long timeOut() default 0;
8080
}

testng-core-api/src/main/java/org/testng/annotations/Factory.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
String dataProvider() default "";
2222

2323
/**
24-
* The class where to look for the data provider. If not specified, the dataprovider will be
24+
* The class where to look for the data provider. If not specified, the data provider will be
2525
* looked on the class of the current test method or one of its super classes. If this attribute
2626
* is specified, the data provider method needs to be static on the specified class.
2727
*

testng-core-api/src/main/java/org/testng/annotations/Test.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@
9696
String dataProvider() default "";
9797

9898
/**
99-
* The class where to look for the data provider. If not specified, the dataprovider will be
99+
* The class where to look for the data provider. If not specified, the data provider will be
100100
* looked on the class of the current test method or one of its super classes. If this attribute
101101
* is specified, the data provider method needs to be static on the specified class.
102102
*

testng-core-api/src/main/java/org/testng/internal/PropertyUtils.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ public static void setProperty(Object instance, String name, String value) {
8989
}
9090

9191
Object realValue = convertType(propClass, value, name);
92-
// TODO: Here the property desc is serched again
92+
// TODO: Here the property desc is searched again
9393
setPropertyRealValue(instance, name, realValue);
9494
}
9595

@@ -130,7 +130,7 @@ private static PropertyDescriptor getPropertyDescriptor(
130130
public static void setPropertyRealValue(Object instance, String name, Object value) {
131131
if (instance == null) {
132132
LOGGER.warn(
133-
"Cannot set property " + name + " with value " + value + ". Targe instance is null");
133+
"Cannot set property " + name + " with value " + value + ". Target instance is null");
134134
return;
135135
}
136136

testng-core-api/src/main/java/org/testng/xml/IWeaveXml.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package org.testng.xml;
22

3-
/** Represents the capabilities of a XML serialiser (As string) */
3+
/** Represents the capabilities of a XML serializer (As string) */
44
public interface IWeaveXml {
55
/**
66
* Helps represent the contents of {@link XmlSuite} as a String.

testng-core-api/src/main/java/org/testng/xml/XmlWeaver.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ private XmlWeaver() {}
1414

1515
private static IWeaveXml getInstance() {
1616
if (testMode) {
17-
// Donot resort to caching when running Unit tests for TestNG, because we have to check
17+
// Do not resort to caching when running Unit tests for TestNG, because we have to check
1818
// both implementations. If we cache the instance, then its not possible to do that.
1919
return attemptDefaultImplementationInstantiation();
2020
}

testng-core/src/main/java/org/testng/SuiteRunnerWorker.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -158,10 +158,10 @@ public void calculateResultCounts(XmlSuite xmlSuite, SuiteRunnerMap suiteRunnerM
158158
for (ISuiteResult isr : tempSuiteResult) {
159159
ITestContext ctx = isr.getTestContext();
160160
int passes = ctx.getPassedTests().size();
161-
Map<String, Integer> seggregated = seggregateSkippedTests(ctx);
162-
int skipped = seggregated.get(SKIPPED);
161+
Map<String, Integer> segregated = seggregateSkippedTests(ctx);
162+
int skipped = segregated.get(SKIPPED);
163163
m_skipped += skipped;
164-
int retried = seggregated.get(RETRIED);
164+
int retried = segregated.get(RETRIED);
165165
m_retries += retried;
166166
int failed =
167167
ctx.getFailedTests().size() + ctx.getFailedButWithinSuccessPercentageTests().size();

testng-core/src/main/java/org/testng/TimeBombSkipException.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
* a time trigger.
1414
*
1515
* <p>By default the time format is yyyy/MM/dd (according to {@code SimpleDateFormat}). You can
16-
* customize this by using the specialized constructors. Suppported date formats are according to
16+
* customize this by using the specialized constructors. Supported date formats are according to
1717
* the {@code SimpleDateFormat}.
1818
*
1919
* @since 5.6
@@ -41,7 +41,7 @@ public TimeBombSkipException(String msg, Date expirationDate) {
4141

4242
/**
4343
* Creates a {@code TimeBombedSkipException} using the <code>expirationDate</code>. The <code>
44-
* format</code> parameter wiil be used for performing the time comparison.
44+
* format</code> parameter will be used for performing the time comparison.
4545
*
4646
* @param msg exception message
4747
* @param expirationDate time limit after which the SKIP becomes a FAILURE
@@ -112,7 +112,7 @@ public TimeBombSkipException(String msg, Date expirationDate, Throwable cause) {
112112

113113
/**
114114
* Creates a {@code TimeBombedSkipException} using the <code>expirationDate</code>. The <code>
115-
* format</code> parameter wiil be used for performing the time comparison.
115+
* format</code> parameter will be used for performing the time comparison.
116116
*
117117
* @param msg exception message
118118
* @param expirationDate time limit after which the SKIP becomes a FAILURE

testng-core/src/main/java/org/testng/internal/BaseTestMethod.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -374,13 +374,13 @@ protected void initGroups(Class<? extends ITestOrConfiguration> annotationClass)
374374
protected void initBeforeAfterGroups(
375375
Class<? extends ITestOrConfiguration> annotationClass, String[] groups) {
376376
String[] groupsAtMethodLevel =
377-
calculateGroupsTouseConsideringValuesAndGroupValues(annotationClass, groups);
377+
calculateGroupsToUseConsideringValuesAndGroupValues(annotationClass, groups);
378378
// @BeforeGroups and @AfterGroups annotation cannot be used at Class level. So its always null
379379
setGroups(getStringArray(groupsAtMethodLevel, null));
380380
initRestOfGroupDependencies(annotationClass);
381381
}
382382

383-
private String[] calculateGroupsTouseConsideringValuesAndGroupValues(
383+
private String[] calculateGroupsToUseConsideringValuesAndGroupValues(
384384
Class<? extends ITestOrConfiguration> annotationClass, String[] groups) {
385385
if (groups == null || groups.length == 0) {
386386
ITestOrConfiguration annotation =

testng-core/src/main/java/org/testng/internal/Parameters.java

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -234,8 +234,8 @@ private static List<Object> createParams(
234234
XmlSuite xmlSuite) {
235235
List<Object> vResult = Lists.newArrayList();
236236
if (optionalValues.length != parameterNames.length) {
237-
FilterOutInJectedTypesResult filterOutResult =
238-
filterOutInJectedTypesFromOptionalValues(parameterTypes, optionalValues);
237+
FilterOutInjectedTypesResult filterOutResult =
238+
filterOutInjectedTypesFromOptionalValues(parameterTypes, optionalValues);
239239
optionalValues = filterOutResult.getOptionalValues();
240240
parameterTypes = filterOutResult.getParameterTypes();
241241
}
@@ -277,9 +277,9 @@ private static List<Object> createParams(
277277
*
278278
* @param parameterTypes - The parameter types to be used
279279
* @param optionalValues - The optional values to be considered.
280-
* @return FilterOutInJectedTypesResult
280+
* @return FilterOutInjectedTypesResult
281281
*/
282-
static FilterOutInJectedTypesResult filterOutInJectedTypesFromOptionalValues(
282+
static FilterOutInjectedTypesResult filterOutInjectedTypesFromOptionalValues(
283283
Class<?>[] parameterTypes, String[] optionalValues) {
284284
List<Class<?>> typeList = Lists.newArrayList(parameterTypes);
285285
List<String> optionalValueList = Lists.newArrayList(optionalValues);
@@ -293,16 +293,16 @@ static FilterOutInJectedTypesResult filterOutInJectedTypesFromOptionalValues(
293293
typeIterator.remove();
294294
}
295295
}
296-
return new FilterOutInJectedTypesResult(
296+
return new FilterOutInjectedTypesResult(
297297
typeList.toArray(new Class<?>[0]), optionalValueList.toArray(new String[0]));
298298
}
299299

300300
/** Store the result of parameterTypes and optionalValues after filter out injected types */
301-
static final class FilterOutInJectedTypesResult {
301+
static final class FilterOutInjectedTypesResult {
302302
private final Class<?>[] parameterTypes;
303303
private final String[] optionalValues;
304304

305-
private FilterOutInJectedTypesResult(Class<?>[] parameterTypes, String[] optionalValues) {
305+
private FilterOutInjectedTypesResult(Class<?>[] parameterTypes, String[] optionalValues) {
306306
this.parameterTypes = parameterTypes;
307307
this.optionalValues = optionalValues;
308308
}
@@ -790,7 +790,7 @@ public static ParameterHolder handleParameters(
790790
initParams =
791791
MethodInvocationHelper.invokeDataProvider(
792792
dataProviderMethod
793-
.getInstance(), /* a test instance or null if the dataprovider is static*/
793+
.getInstance(), /* a test instance or null if the data provider is static*/
794794
dataProviderMethod.getMethod(),
795795
testMethod,
796796
methodParams.context,

testng-core/src/main/java/org/testng/internal/invokers/TestMethodWorker.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -109,32 +109,32 @@ public String toString() {
109109
public void run() {
110110
this.currentThreadId = Thread.currentThread().getId();
111111
if (RuntimeBehavior.enforceThreadAffinity()
112-
&& doesTaskHavePreRequistes()
112+
&& doesTaskHavePreRequisites()
113113
&& currentThreadId != threadIdToRunOn) {
114114
completed = false;
115115
return;
116116
}
117117

118-
for (IMethodInstance testMthdInst : m_methodInstances) {
119-
ITestNGMethod testMethod = testMthdInst.getMethod();
118+
for (IMethodInstance testMethdInstance : m_methodInstances) {
119+
ITestNGMethod testMethod = testMethdInstance.getMethod();
120120
if (canInvokeBeforeClassMethods()) {
121121
synchronized (testMethod.getInstance()) {
122-
invokeBeforeClassMethods(testMethod.getTestClass(), testMthdInst);
122+
invokeBeforeClassMethods(testMethod.getTestClass(), testMethdInstance);
123123
}
124124
}
125125

126126
// Invoke test method
127127
try {
128-
invokeTestMethods(testMethod, testMthdInst.getInstance());
128+
invokeTestMethods(testMethod, testMethdInstance.getInstance());
129129
} finally {
130130
synchronized (testMethod.getInstance()) {
131-
invokeAfterClassMethods(testMethod.getTestClass(), testMthdInst);
131+
invokeAfterClassMethods(testMethod.getTestClass(), testMethdInstance);
132132
}
133133
}
134134
}
135135
}
136136

137-
private boolean doesTaskHavePreRequistes() {
137+
private boolean doesTaskHavePreRequisites() {
138138
return threadIdToRunOn != -1;
139139
}
140140

testng-core/src/main/java/org/testng/junit/JUnit4TestRunner.java

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ public class JUnit4TestRunner implements IJUnitTestRunner {
2222
private final ITestObjectFactory objectFactory;
2323
private final ITestResultNotifier m_parentRunner;
2424
private final List<ITestListener> m_listeners;
25-
private List<ITestNGMethod> m_methods = Lists.newArrayList();
25+
private final List<ITestNGMethod> m_methods = Lists.newArrayList();
2626
private Collection<IInvokedMethodListener> m_invokeListeners = Lists.newArrayList();
27-
private Map<Description, ITestResult> m_findedMethods = new WeakHashMap<>();
27+
private final Map<Description, ITestResult> m_foundMethods = new WeakHashMap<>();
2828

2929
public JUnit4TestRunner(ITestObjectFactory objectFactory, ITestResultNotifier tr) {
3030
this.objectFactory = objectFactory;
@@ -80,7 +80,7 @@ public boolean shouldRun(Description description) {
8080
if (methods.length == 0) {
8181
if (description.getTestClass() != null) {
8282
ITestResult tr = createTestResult(objectFactory, description);
83-
m_findedMethods.put(description, tr);
83+
m_foundMethods.put(description, tr);
8484
}
8585
// run everything
8686
return true;
@@ -89,7 +89,7 @@ public boolean shouldRun(Description description) {
8989
Pattern p = Pattern.compile(m);
9090
if (p.matcher(description.getMethodName()).matches()) {
9191
ITestResult tr = createTestResult(objectFactory, description);
92-
m_findedMethods.put(description, tr);
92+
m_foundMethods.put(description, tr);
9393
return true;
9494
}
9595
}
@@ -113,7 +113,7 @@ private class RL extends RunListener {
113113
@Override
114114
public void testAssumptionFailure(Failure failure) {
115115
notified.add(failure.getDescription());
116-
ITestResult tr = m_findedMethods.get(failure.getDescription());
116+
ITestResult tr = m_foundMethods.get(failure.getDescription());
117117
validate(tr, failure.getDescription());
118118
runAfterInvocationListeners(tr);
119119
tr.setStatus(TestResult.SKIP);
@@ -135,7 +135,7 @@ public void testFailure(Failure failure) throws Exception {
135135
return;
136136
}
137137
notified.add(failure.getDescription());
138-
ITestResult tr = m_findedMethods.get(failure.getDescription());
138+
ITestResult tr = m_foundMethods.get(failure.getDescription());
139139
if (tr == null) {
140140
// Not a test method, should be a config
141141
tr = createTestResult(objectFactory, failure.getDescription());
@@ -163,7 +163,7 @@ public void testFailure(Failure failure) throws Exception {
163163

164164
@Override
165165
public void testFinished(Description description) throws Exception {
166-
ITestResult tr = m_findedMethods.get(description);
166+
ITestResult tr = m_foundMethods.get(description);
167167
validate(tr, description);
168168
runAfterInvocationListeners(tr);
169169
if (!notified.contains(description)) {
@@ -181,7 +181,7 @@ public void testFinished(Description description) throws Exception {
181181
public void testIgnored(Description description) throws Exception {
182182
if (!notified.contains(description)) {
183183
notified.add(description);
184-
ITestResult tr = m_findedMethods.get(description);
184+
ITestResult tr = m_foundMethods.get(description);
185185
validate(tr, description);
186186
runAfterInvocationListeners(tr);
187187
tr.setStatus(TestResult.SKIP);
@@ -202,7 +202,7 @@ public void testRunStarted(Description description) throws Exception {}
202202

203203
@Override
204204
public void testStarted(Description description) throws Exception {
205-
ITestResult tr = m_findedMethods.get(description);
205+
ITestResult tr = m_foundMethods.get(description);
206206
validate(tr, description);
207207
for (ITestListener l : m_listeners) {
208208
l.onTestStart(tr);

testng-core/src/main/java/org/testng/reporters/util/StackTraceTools.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public static int getTestRoot(StackTraceElement[] stack, ITestNGMethod method) {
4040
* @return topmost position of the test method in the stack, or top of stack if <code>method
4141
* </code> is not in it.
4242
*/
43-
public static StackTraceElement[] getTestNGInstrastructure(
43+
public static StackTraceElement[] getTestNGInfrastructure(
4444
StackTraceElement[] stack, ITestNGMethod method) {
4545
if (method == null || stack == null) {
4646
return new StackTraceElement[] {};

testng-core/src/test/java/org/testng/internal/ParametersTest.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
import org.testng.annotations.Optional;
66
import org.testng.annotations.Parameters;
77
import org.testng.annotations.Test;
8-
import org.testng.internal.Parameters.FilterOutInJectedTypesResult;
8+
import org.testng.internal.Parameters.FilterOutInjectedTypesResult;
99
import org.testng.internal.annotations.JDK15AnnotationFinder;
1010
import org.testng.xml.XmlTest;
1111

@@ -19,8 +19,8 @@ public void filterOutInJectedTypesFromOptionalValuesTest(
1919
XmlTest xmlTest, @Optional("optionaltestdata") String testdata) {
2020
JDK15AnnotationFinder finder = new JDK15AnnotationFinder(null);
2121
Method curMethod = new Object() {}.getClass().getEnclosingMethod();
22-
FilterOutInJectedTypesResult filterOutResult =
23-
org.testng.internal.Parameters.filterOutInJectedTypesFromOptionalValues(
22+
FilterOutInjectedTypesResult filterOutResult =
23+
org.testng.internal.Parameters.filterOutInjectedTypesFromOptionalValues(
2424
curMethod.getParameterTypes(), finder.findOptionalValues(curMethod));
2525
Assert.assertEquals(filterOutResult.getOptionalValues()[0], "optionaltestdata");
2626
Assert.assertEquals(filterOutResult.getParameterTypes()[0], String.class);

0 commit comments

Comments
 (0)