Skip to content

Commit

Permalink
pfop
Browse files Browse the repository at this point in the history
  • Loading branch information
YangSen-qn committed Sep 9, 2024
1 parent a070b0b commit be09120
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
1 change: 0 additions & 1 deletion src/main/java/com/qiniu/processing/OperationManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,6 @@ public String pfop(String bucket, String key, String fops, String pipeline, bool
public String pfop(String bucket, String key, String fops, String pipeline, String notifyURL, boolean force)

Check warning on line 155 in src/main/java/com/qiniu/processing/OperationManager.java

View check run for this annotation

qiniu-x / stylecheck

src/main/java/com/qiniu/processing/OperationManager.java#L155

Line is longer than 80 characters (found 112). [LineLength]

Check warning on line 155 in src/main/java/com/qiniu/processing/OperationManager.java

View check run for this annotation

qiniu-x / stylecheck

src/main/java/com/qiniu/processing/OperationManager.java#L155

Parameter bucket should be final. [FinalParameters]

Check warning on line 155 in src/main/java/com/qiniu/processing/OperationManager.java

View check run for this annotation

qiniu-x / stylecheck

src/main/java/com/qiniu/processing/OperationManager.java#L155

Parameter key should be final. [FinalParameters]

Check warning on line 155 in src/main/java/com/qiniu/processing/OperationManager.java

View check run for this annotation

qiniu-x / stylecheck

src/main/java/com/qiniu/processing/OperationManager.java#L155

Parameter fops should be final. [FinalParameters]

Check warning on line 155 in src/main/java/com/qiniu/processing/OperationManager.java

View check run for this annotation

qiniu-x / stylecheck

src/main/java/com/qiniu/processing/OperationManager.java#L155

Parameter pipeline should be final. [FinalParameters]

Check warning on line 155 in src/main/java/com/qiniu/processing/OperationManager.java

View check run for this annotation

qiniu-x / stylecheck

src/main/java/com/qiniu/processing/OperationManager.java#L155

Parameter notifyURL should be final. [FinalParameters]

Check warning on line 155 in src/main/java/com/qiniu/processing/OperationManager.java

View check run for this annotation

qiniu-x / stylecheck

src/main/java/com/qiniu/processing/OperationManager.java#L155

Parameter force should be final. [FinalParameters]
throws QiniuException {
StringMap params = new StringMap()
.putNotEmpty("type", "1")
.putNotEmpty("pipeline", pipeline)
.putNotEmpty("notifyURL", notifyURL)
.putWhen("force", 1, force);
Expand Down
4 changes: 2 additions & 2 deletions src/test/java/test/com/qiniu/processing/PfopTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
import com.qiniu.storage.Configuration;
import com.qiniu.storage.Region;
import com.qiniu.util.Auth;
import com.qiniu.util.StringMap;
import com.qiniu.util.StringUtils;
import com.qiniu.util.UrlSafeBase64;
import org.junit.jupiter.api.Tag;
Expand Down Expand Up @@ -142,7 +141,7 @@ private void testPfopIsSuccess(String jobid) {

@Test
@Tag("IntegrationTest")
public void testPfopA() {
void testPfopA() {

Check warning on line 144 in src/test/java/test/com/qiniu/processing/PfopTest.java

View check run for this annotation

qiniu-x / pmdcheck

src/test/java/test/com/qiniu/processing/PfopTest.java#L144

Unit tests should not contain more than 1 assert(s).
try {
Auth auth = TestConfig.testAuth;
Map<String, Region> bucketKeyMap = new HashMap<String, Region>();
Expand All @@ -160,6 +159,7 @@ public void testPfopA() {

OperationStatus status = operationManager.prefop(bucket, jobID);
assertNotNull(status, "1. prefop type error");
assertNotNull(status.creationDate, "1. prefop type error");
assertTrue(status.code == 0 || status.code == 1 || status.code == 3, "2. prefop type error");

Check warning on line 163 in src/test/java/test/com/qiniu/processing/PfopTest.java

View check run for this annotation

qiniu-x / stylecheck

src/test/java/test/com/qiniu/processing/PfopTest.java#L163

Line is longer than 80 characters (found 109). [LineLength]

Check warning on line 163 in src/test/java/test/com/qiniu/processing/PfopTest.java

View check run for this annotation

qiniu-x / stylecheck

src/test/java/test/com/qiniu/processing/PfopTest.java#L163

'3' is a magic number. [MagicNumber]
assertEquals("1", status.type, "3. prefop type error");
}
Expand Down

0 comments on commit be09120

Please sign in to comment.