liuz888 / opcua4j

Automatically exported from code.google.com/p/opcua4j
0 stars 0 forks source link

testGetChildren(bpi.most.server.services.opcua.server.MostNodeManagerTest) FAILS #1

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
1. Checked out the MOST from GIT @ ..tuwien.ac.at 
2. from Eclipse: maven clean, maven build

WIN7, JDK 1.6

Looked at MostOpcUaStandaloneServer.java and found:

private void run() {
        String endpointUrl = "opc.tcp://127.0.0.1:6001/mostopcua";
        String keyPhrase = "mostrulez";
        String certPath = "META-INF/pki/server.pem";
        String keyPath = "META-INF/pki/server.key";

Is this endpointUrl right?

Original issue reported on code.google.com by crimblet...@gmail.com on 5 Oct 2013 at 5:53

GoogleCodeExporter commented 9 years ago
Here is the console output:

08:09:25.844 [main] INFO  o.s.t.c.t.TransactionalTestExecutionListener - Rolled 
back transaction after test execution fo
r test context [[TestContext@2b313906 testClass = MostNodeManagerTest, 
locations = array<String>['classpath:/META-INF/op
cua.service.spring.xml'], testInstance = 
bpi.most.server.services.opcua.server.MostNodeManagerTest@7087e9bf, testMethod 
= testGetChildren@MostNodeManagerTest, testException = 
junit.framework.AssertionFailedError: expected:<2> but was:<6>]]
08:09:25.844 [main] DEBUG o.s.t.c.s.DirtiesContextTestExecutionListener - After 
test method: context [[TestContext@2b313
906 testClass = MostNodeManagerTest, locations = 
array<String>['classpath:/META-INF/opcua.service.spring.xml'], testInst
ance = bpi.most.server.services.opcua.server.MostNodeManagerTest@7087e9bf, 
testMethod = testGetChildren@MostNodeManagerT
est, testException = junit.framework.AssertionFailedError: expected:<2> but 
was:<6>]], class dirties context [false], cl
ass mode [null], method dirties context [false].
08:09:25.860 [main] DEBUG o.s.t.c.s.DirtiesContextTestExecutionListener - After 
test class: context [[TestContext@2b3139
06 testClass = MostNodeManagerTest, locations = 
array<String>['classpath:/META-INF/opcua.service.spring.xml'], testInsta
nce = [null], testMethod = [null], testException = [null]]], dirtiesContext 
[false].
Tests run: 3, Failures: 1, Errors: 0, Skipped: 1, Time elapsed: 6.089 sec <<< 
FAILURE!
testGetChildren(bpi.most.server.services.opcua.server.MostNodeManagerTest)  
Time elapsed: 0.437 sec  <<< FAILURE!
junit.framework.AssertionFailedError: expected:<2> but was:<6>
    at junit.framework.Assert.fail(Assert.java:50)
    at junit.framework.Assert.failNotEquals(Assert.java:287)
    at junit.framework.Assert.assertEquals(Assert.java:67)
    at junit.framework.Assert.assertEquals(Assert.java:199)
    at junit.framework.Assert.assertEquals(Assert.java:205)
    at bpi.most.server.services.opcua.server.MostNodeManagerTest.testGetChildren(MostNodeManagerTest.java:54)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:45)
    at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
    at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:42)
    at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
    at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
    at org.springframework.test.context.junit4.statements.RunBeforeTestMethodCallbacks.evaluate(RunBeforeTestMethodCallback
s.java:74)
    at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:30)
    at org.springframework.test.context.junit4.statements.RunAfterTestMethodCallbacks.evaluate(RunAfterTestMethodCallbacks.
java:82)
    at org.springframework.test.context.junit4.statements.SpringRepeat.evaluate(SpringRepeat.java:72)
    at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:231)
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:47)
    at org.junit.runners.ParentRunner$3.run(ParentRunner.java:231)
    at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:60)
    at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:229)
    at org.junit.runners.ParentRunner.access$000(ParentRunner.java:50)
    at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:222)
    at org.springframework.test.context.junit4.statements.RunBeforeTestClassCallbacks.evaluate(RunBeforeTestClassCallbacks.
java:61)
    at org.springframework.test.context.junit4.statements.RunAfterTestClassCallbacks.evaluate(RunAfterTestClassCallbacks.ja
va:70)
    at org.junit.runners.ParentRunner.run(ParentRunner.java:300)
    at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:174)
    at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:252)
    at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:141)
    at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:112)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:189)
    at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:165)
    at org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:85)
    at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:115)
    at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:75)

08:09:25.860 [Thread-0] INFO  o.s.c.s.GenericApplicationContext - Closing 
org.springframework.context.support.GenericApp
licationContext@7f70888e: startup date [Sat Oct 05 08:09:20 EEST 2013]; root of 
context hierarchy
08:09:25.860 [Thread-0] DEBUG o.s.b.f.s.DefaultListableBeanFactory - Returning 
cached instance of singleton bean 'lifecy
cleProcessor'
08:09:25.860 [Thread-0] INFO  o.s.b.f.s.DefaultListableBeanFactory - Destroying 
singletons in org.springframework.beans.
factory.support.DefaultListableBeanFactory@4929b0e1: defining beans 
[org.springframework.aop.config.internalAutoProxyCre
ator,org.springframework.transaction.annotation.AnnotationTransactionAttributeSo
urce#0,org.springframework.transaction.i
nterceptor.TransactionInterceptor#0,org.springframework.transaction.config.inter
nalTransactionAdvisor,myDataSource,entit
yManagerFactory,transactionManager,org.springframework.orm.jpa.support.Persisten
ceAnnotationBeanPostProcessor#0,authenti
cationServiceImpl,connectorServiceImpl,datapointServiceImpl,inMemoryVdpRegistry,
registrationServiceImpl,zoneServiceImpl,
org.springframework.context.annotation.internalConfigurationAnnotationProcessor,
org.springframework.context.annotation.i
nternalAutowiredAnnotationProcessor,org.springframework.context.annotation.inter
nalRequiredAnnotationProcessor,org.sprin
gframework.context.annotation.internalCommonAnnotationProcessor,org.springframew
ork.context.annotation.internalPersisten
ceAnnotationProcessor,datapointDataFinder,mostOpcUaServer,userAuthenticator,node
Manager,historyNodeManager]; root of fac
tory hierarchy
08:09:25.860 [Thread-0] DEBUG o.s.b.f.s.DefaultListableBeanFactory - Retrieved 
dependent beans for bean 'nodeManager': [
bpi.most.server.services.opcua.server.MostNodeManagerTest]
08:09:25.860 [Thread-0] DEBUG o.s.b.f.s.DefaultListableBeanFactory - Retrieved 
dependent beans for bean 'org.springframe
work.orm.jpa.support.SharedEntityManagerBean#7fd88db7': [datapointDataFinder]
08:09:25.860 [Thread-0] DEBUG o.s.b.f.s.DisposableBeanAdapter - Invoking 
destroy() on bean with name 'entityManagerFacto
ry'
08:09:25.860 [Thread-0] INFO  o.s.o.j.LocalContainerEntityManagerFactoryBean - 
Closing JPA EntityManagerFactory for pers
istence unit 'most'
08:09:25.860 [Thread-0] INFO  o.hibernate.impl.SessionFactoryImpl - closing
08:09:25.860 [Thread-0] DEBUG o.s.b.f.s.DefaultListableBeanFactory - Retrieved 
dependent beans for bean 'org.springframe
work.orm.jpa.vendor.HibernateJpaDialect#565bb966': [entityManagerFactory]
08:09:25.860 [Thread-0] DEBUG o.s.b.f.s.DisposableBeanAdapter - Invoking 
destroy method 'close' on bean with name 'myDat
aSource'
08:09:25.860 [Thread-0] DEBUG o.s.b.f.s.DefaultListableBeanFactory - Retrieved 
dependent beans for bean 'org.springframe
work.transaction.annotation.AnnotationTransactionAttributeSource#0': 
[org.springframework.transaction.config.internalTra
nsactionAdvisor]

Results :

Failed tests:   
testGetChildren(bpi.most.server.services.opcua.server.MostNodeManagerTest): 
expected:<2> but was:<6>

Tests run: 3, Failures: 1, Errors: 0, Skipped: 1

[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO] 
[INFO] MOST Parent Project ............................... SUCCESS [40.329s]
[INFO] MOST Domain ....................................... SUCCESS [15.513s]
[INFO] MOST Service API .................................. SUCCESS [0.328s]
[INFO] MOST Service IMPL ................................. SUCCESS [41.978s]
[INFO] MOST Service IMPL RMI-Proxy ....................... SUCCESS [4.510s]
[INFO] MOST Web .......................................... SUCCESS [3:43.754s]
[INFO] MOST REST ......................................... SUCCESS [1:11.993s]
[INFO] MOST OPC .......................................... FAILURE [13.720s]
[INFO] MOST Connector .................................... SKIPPED
[INFO] MOST Calibration .................................. SKIPPED
[INFO] MOST Main Module .................................. SKIPPED
[INFO] MOST Module for Virtual Datapoints ................ SKIPPED
[INFO] MOST Preprocessing ................................ SKIPPED
[INFO] MOST Cassandra .................................... SKIPPED
[INFO] MOST Neo4J ........................................ SKIPPED
[INFO] MOST oBIX ......................................... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 6:52.626s
[INFO] Finished at: Sat Oct 05 08:09:25 EEST 2013
[INFO] Final Memory: 48M/110M

Original comment by crimblet...@gmail.com on 5 Oct 2013 at 6:06