Skip to content

Commit

Permalink
Update TODOs
Browse files Browse the repository at this point in the history
  • Loading branch information
atodorov committed Apr 21, 2019
1 parent 32dfa79 commit 6c42e4d
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
13 changes: 9 additions & 4 deletions src/main/java/org/kiwitcms/java/junit/TestDataEmitter.java
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,13 @@ public int getPlanId() {
public int getTestRunId() {
if (runId == null) {
Integer testRun = config.getRunId();
if (testRun != null && client.getRun(testRun) != null) {
runId = testRun;
} else {
if (testRun != null) {
runId = client.getRun(testRun).getId();
}

//TODO: this must check if this TR is already available in the DB
// and not create a new TR for the same product, version and build
if (runId == null) {
runId = client.createNewRun(getBuild(getProductId()),
config.getUsername(),
getPlanId(),
Expand All @@ -97,7 +101,8 @@ public void addTestResultsToRun(int runId, List<TestMethod> tests) {
for (TestMethod test : tests) {
TestCase testCase = client.getOrCreateTestCase(productId, categoryId, priorityId, test.getSummary());
client.addTestCaseToPlan(testPlanId, testCase.getCaseId());
// todo: does this check for existing ???
// TODO: this method should accept casesInTestRun and not call RPC if the TestCase
// has already been added inside the TestRun
TestExecution testExecution = client.addTestCaseToRunId(runId, testCase.getCaseId());

client.updateTestExecution(testExecution.getTcRunId(), test.getTestExecutionStatus());
Expand Down
1 change: 1 addition & 0 deletions src/main/java/org/kiwitcms/java/model/TestRun.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ public int getId() {
}

@JsonSetter("run_id")
//TODO: doesn't this need to be setId? Is it used at all?
public void seId(int id) {
this.id = id;
}
Expand Down

0 comments on commit 6c42e4d

Please sign in to comment.