Skip to content

Commit 1b34c61

Browse files
author
YangSen-qn
committed
Merge branch 'master' into code-gen
# Conflicts: # src/main/java/com/qiniu/storage/Api.java # src/test/java/test/com/qiniu/processing/PfopTest.java
2 parents eae74b9 + 01edc79 commit 1b34c61

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -217,10 +217,10 @@ public String pfop(String bucket, String key, String fops, String pipeline, Stri
217217
* @throws QiniuException 触发失败异常,包含错误响应等信息
218218
* <a href="http://developer.qiniu.com/dora/api/persistent-data-processing-pfop"> 相关链接 </a>
219219
*/
220-
public String pfop(String bucket, String key, String fops, String pipeline, String notifyURL, String type, boolean force)
220+
public String pfop(String bucket, String key, String fops, String pipeline, String notifyURL, Integer type, boolean force)
221221
throws QiniuException {
222222
StringMap params = new StringMap()
223-
.putNotEmpty("type", type)
223+
.putNotNull("type", type)
224224
.putNotEmpty("pipeline", pipeline)
225225
.putNotEmpty("notifyURL", notifyURL)
226226
.putWhen("force", 1, force);

src/main/java/com/qiniu/processing/OperationStatus.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ public class OperationStatus {
4545
* 0:非闲时任务
4646
* 1:显示任务
4747
*/
48-
public String type;
48+
public Integer type;
4949

5050
/**
5151
* 任务创建时间

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ private void testPfopIsSuccess(String jobid) {
141141

142142
@Test
143143
@Tag("IntegrationTest")
144-
void testPfopA() {
144+
void testPfopWithType() {
145145
try {
146146
Auth auth = TestConfig.testAuth;
147147
Map<String, Region> bucketKeyMap = new HashMap<String, Region>();
@@ -155,13 +155,13 @@ void testPfopA() {
155155

156156
Configuration cfg = new Configuration(region);
157157
OperationManager operationManager = new OperationManager(auth, cfg);
158-
String jobID = operationManager.pfop(bucket, TestConfig.testMp4FileKey, "avinfo", "", "", "1", true);
158+
String jobID = operationManager.pfop(bucket, TestConfig.testMp4FileKey, "avinfo", "", "", 1, true);
159159

160160
OperationStatus status = operationManager.prefop(bucket, jobID);
161161
assertNotNull(status, "1. prefop type error");
162162
assertNotNull(status.creationDate, "1. prefop type error");
163163
assertTrue(status.code == 0 || status.code == 1 || status.code == 3, "2. prefop type error");
164-
assertEquals("1", status.type, "3. prefop type error");
164+
assertEquals(1, (int) status.type, "3. prefop type error");
165165
}
166166

167167
} catch (QiniuException ex) {

0 commit comments

Comments
 (0)