From: vasary.daniel Date: Fri, 15 Apr 2022 08:04:55 +0000 (+0000) Subject: octopus dataminer bovites: helyszin, leiras X-Git-Url: http://git.useribm.hu/?a=commitdiff_plain;h=67d0f06af5a3dde1ac1641ad3b9929f02b442afe;p=mediacube.git octopus dataminer bovites: helyszin, leiras git-tfs-id: [http://tfs.userrendszerhaz.hu:8080/tfs/DefaultCollection]$/MediaCube;C33170 --- diff --git a/server/hu.user.mediacube.executors.tests/src/hu/user/mediacube/executors/tests/OctopusTests.java b/server/hu.user.mediacube.executors.tests/src/hu/user/mediacube/executors/tests/OctopusTests.java index ab01b3e2..5550f901 100644 --- a/server/hu.user.mediacube.executors.tests/src/hu/user/mediacube/executors/tests/OctopusTests.java +++ b/server/hu.user.mediacube.executors.tests/src/hu/user/mediacube/executors/tests/OctopusTests.java @@ -2,6 +2,7 @@ package hu.user.mediacube.executors.tests; import java.util.List; +import org.junit.BeforeClass; import org.junit.Test; import com.ibm.nosql.json.api.BasicDBObject; @@ -12,21 +13,56 @@ import user.commons.octopus.IOctopusAPI; import user.jobengine.server.steps.shared.OctopusDataMiner; public class OctopusTests { - private OctopusDataMiner sut = null; + private static OctopusDataMiner sut = null; - @Test - public void test0() throws Exception { + @BeforeClass + static public void beforeClass() { String address = SystemConfiguration.getInstance().value("services.octopus.api.address"); String user = SystemConfiguration.getInstance().value("services.octopus.api.user"); String pwd = SystemConfiguration.getInstance().value("services.octopus.api.password"); sut = new OctopusDataMiner(address, user, pwd); + } + + /*** + * Osszes tukor es story-k lekerdezese + * + * @throws Exception + */ + @Test + public void test0() throws Exception { + List rundowns = NoSQLUtils.asList(sut.queryRundowns()); + rundowns.forEach(r -> processRundown(r)); + } + + /*** + * Osszes mappa es story-k lekerdezese + * + * @throws Exception + */ + @Test + public void test1() throws Exception { List folders = NoSQLUtils.asList(sut.queryStoryFolders()); folders.forEach(f -> processFolders(f)); + } -// List rundowns = NoSQLUtils.asList(sut.queryRundowns()); -// rundowns.forEach(r -> processRundown(r)); + /*** + * Teszt story lekerdezes + * + * @throws Exception + */ + @Test + public void test2() throws Exception { + BasicDBObject story = sut.queryStory(649172547); + sut.normalizeStory(story); + String location = story.getString(IOctopusAPI.LOCATION); + if (location != null) + System.out.println(story.toPrettyString("")); + + String desc = story.getString(IOctopusAPI.DESCRIPTIONS); + if (desc != null) + System.out.println(story.toPrettyString("")); } private void processFolders(BasicDBObject f) { diff --git a/server/user.jobengine.executors/src/user/jobengine/server/steps/shared/OctopusDataMiner.java b/server/user.jobengine.executors/src/user/jobengine/server/steps/shared/OctopusDataMiner.java index 6d2b3754..0a5e40de 100644 --- a/server/user.jobengine.executors/src/user/jobengine/server/steps/shared/OctopusDataMiner.java +++ b/server/user.jobengine.executors/src/user/jobengine/server/steps/shared/OctopusDataMiner.java @@ -684,7 +684,7 @@ public class OctopusDataMiner { story.remove(IOctopusAPI.CUSTOM_COLUMNS); story.remove(IOctopusAPI.SCRIPT); - story.remove(IOctopusAPI.DESCRIPTIONS); + // story.remove(IOctopusAPI.DESCRIPTIONS); } private void storeStoryFolder(BasicDBObject storyFolder) {