-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
allow responses of resources contain data but data is not an object (#69
) * allow responses of resources contain data but data is not an object --------- Co-authored-by: zeyu10 <[email protected]>
- Loading branch information
1 parent
21feb20
commit 7d72d59
Showing
2 changed files
with
33 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
...ice/src/test/groovy/com/weibo/rill/flow/service/statistic/DAGResourceStatisticTest.groovy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package com.weibo.rill.flow.service.statistic | ||
|
||
import com.alibaba.fastjson.JSONObject | ||
import spock.lang.Specification | ||
import spock.lang.Unroll | ||
|
||
class DAGResourceStatisticTest extends Specification { | ||
DAGResourceStatistic statistic = new DAGResourceStatistic() | ||
|
||
@Unroll | ||
def "test getRetryIntervalSeconds"() { | ||
when: | ||
JSONObject urlRet1 = new JSONObject(Map.of("data", "message")) | ||
JSONObject urlRet2 = new JSONObject(Map.of("data", Map.of("sys_info", Map.of("retry_interval_seconds", 100)))) | ||
JSONObject urlRet3 = new JSONObject(Map.of("error_detail", Map.of("retry_interval_seconds", 100))) | ||
then: | ||
statistic.getRetryIntervalSeconds(urlRet1) == 0 | ||
statistic.getRetryIntervalSeconds(urlRet2) == 100 | ||
statistic.getRetryIntervalSeconds(urlRet3) == 100 | ||
} | ||
} |