Skip to content

Commit faff2d9

Browse files
authored
Fix powerjob test when python is not available (#12315)
1 parent 3633d2b commit faff2d9

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

instrumentation/powerjob-4.0/javaagent/src/test/java/io/opentelemetry/javaagent/instrumentation/powerjob/v4_0/PowerJobBasicProcessorTest.java

+2-4
Original file line numberDiff line numberDiff line change
@@ -207,9 +207,10 @@ void testPythonProcessor() throws Exception {
207207
trace -> {
208208
trace.hasSpansSatisfyingExactly(
209209
span -> {
210+
// not asserting status as it is either unset or error depending on whether python
211+
// is available or not
210212
span.hasName(String.format("%s.process", PythonProcessor.class.getSimpleName()))
211213
.hasKind(SpanKind.INTERNAL)
212-
.hasStatus(StatusData.unset())
213214
.hasAttributesSatisfyingExactly(
214215
attributeAssertions(
215216
PythonProcessor.class.getName(), jobId, jobParam, PYTHON_PROCESSOR));
@@ -219,7 +220,6 @@ void testPythonProcessor() throws Exception {
219220

220221
@Test
221222
void testHttpProcessor() throws Exception {
222-
223223
long jobId = 1;
224224
String jobParam = "{\"method\":\"GET\"}";
225225
TaskContext taskContext = genTaskContext(jobId, jobParam);
@@ -243,7 +243,6 @@ void testHttpProcessor() throws Exception {
243243

244244
@Test
245245
void testFileCleanerProcessor() throws Exception {
246-
247246
long jobId = 1;
248247
JSONObject params = new JSONObject();
249248
params.put("dirPath", "/abc");
@@ -305,7 +304,6 @@ void testSpringDataSourceProcessor() throws Exception {
305304

306305
@Test
307306
void testDynamicDataSourceProcessor() throws Exception {
308-
309307
long jobId = 1;
310308
String jobParam = "{\"dirPath\":\"/abc\"}";
311309
TaskContext taskContext = genTaskContext(jobId, jobParam);

0 commit comments

Comments
 (0)