git-tfs-id: [http://tfs.userrendszerhaz.hu:8080/tfs/DefaultCollection]$/MediaCube...
authorVásáry Dániel <daniel.vasary@userrendszerhaz.hu>
Fri, 14 Sep 2018 11:37:36 +0000 (11:37 +0000)
committerVásáry Dániel <daniel.vasary@userrendszerhaz.hu>
Fri, 14 Sep 2018 11:37:36 +0000 (11:37 +0000)
server/user.jobengine.osgi.commons/src/user/commons/nexio/api/MediabaseImpl.java
server/user.jobengine.osgi.commons/test/user/common/nexio/test/NexioDataMinerTest.java

index 4c841bc8f6f831bb256f3706c896fdd8a51d8b17..d54ca44dfb25d20a1536dcbbe1d99e169e2b6762 100644 (file)
@@ -29,6 +29,7 @@ class MediabaseImpl implements Mediabase {
                        if (next == null) {
                                return null;
                        }
+
                        final Clip c = next;
                        try {
                                Id id = protocol.executeListNextIDHandle();
index 84bd763c352fc23df1685760942eb21340f8cbe2..411214ae59016d51bffe0f6331780185d3bf0fd8 100644 (file)
@@ -1,14 +1,12 @@
 package user.common.nexio.test;\r
 \r
-import java.io.FileInputStream;\r
-import java.lang.invoke.MethodHandles;\r
-import java.net.URL;\r
-import java.util.Properties;\r
+import java.util.Iterator;\r
 \r
 import org.junit.BeforeClass;\r
 import org.junit.Test;\r
 \r
 import user.commons.nexio.NexioDataMiner;\r
+import user.commons.nexio.api.Clip;\r
 import user.commons.nexio.api.Controller;\r
 \r
 public class NexioDataMinerTest {\r
@@ -49,11 +47,11 @@ public class NexioDataMinerTest {
                //              Logger.getRootLogger().setLevel(LOG_LEVEL);\r
 \r
                //Kornyezeti valtozok betoltese\r
-               Properties properties = new Properties();\r
-               URL srcLocation = MethodHandles.lookup().lookupClass().getProtectionDomain().getCodeSource().getLocation();\r
-               URL location = new URL(srcLocation, "../../-configuration/mediacube-dev.properties");\r
-               properties.load(new FileInputStream(location.toURI().getPath().toString()));\r
-               System.getProperties().putAll(properties);\r
+               //              Properties properties = new Properties();\r
+               //              URL srcLocation = MethodHandles.lookup().lookupClass().getProtectionDomain().getCodeSource().getLocation();\r
+               //              URL location = new URL(srcLocation, "../../-configuration/mediacube-dev.properties");\r
+               //              properties.load(new FileInputStream(location.toURI().getPath().toString()));\r
+               //              System.getProperties().putAll(properties);\r
        }\r
 \r
        public static String longToStr(long b) {\r
@@ -64,6 +62,20 @@ public class NexioDataMinerTest {
 \r
        private NexioDataMiner sut;\r
 \r
+       @Test\r
+       public void quickInit() throws Exception {\r
+               Controller c = new Controller("10.10.1.55");\r
+               c.connect();\r
+               Iterator<Clip> clipsIter = c.getMediabase().getClips();\r
+               int i = 100;\r
+               while (clipsIter.hasNext() && i > 0) {\r
+                       System.out.println(clipsIter.next().getId());\r
+                       i--;\r
+               }\r
+               c.disconnect();\r
+               //c.getMediabase().getProtocol().setDescription("%0000205", "VALAMI");\r
+       }\r
+\r
        @Test\r
        public void reset() {\r
                sut = new NexioDataMiner();\r
@@ -81,6 +93,7 @@ public class NexioDataMinerTest {
                Controller c = new Controller("10.10.1.56");\r
                c.connect();\r
                c.getMediabase().getProtocol().setDescription("%0000205", "VALAMI");\r
+\r
        }\r
 \r
        @Test\r