EncoredTech / OpenADR-Virtual-Top-Node

This application is an implementation of a virtual top node (VTN) as defined in the OpenADR Alliance’s OpenADR 2.0 Profile Specification B Profile, updated July 1, 2013. OpenADR defines a machine-to-machine interface and includes the information model, transport and security mechanisms, and the manner in which data is exchanged between two end points.
Other
0 stars 0 forks source link

[2.0a push event test] E2_0657_TH_VEN 테스트 실패 #14

Closed Duckuism closed 5 years ago

Duckuism commented 5 years ago
Test Case Name : E2_0657_TH_VEN
VTN Cancel Retries, VTN Push oadrDistributeEvent
Test Start Time : Wed Dec 19 11:02:00 KST 2018
Test End Time : Wed Dec 19 11:05:34 KST 2018
Name of Implementation
Version Number
1.0.6
Additional Info

--------------------------------------

Waiting for user action :Wed Dec 19 11:02:03 KST 2018

----------------REQUEST---------------------
Current Time : 2018-12-19T02:02:16Z

----Client Address---
127.0.0.1

----Header---
[Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2]
[Connection: keep-alive]
[User-Agent: Java/1.7.0_181]
[Content-Type: application/xml]
[Content-Length: 753]
[Host: host.docker.internal:8081]

<?xml version="1.0" encoding="UTF-8"?>
<ns6:oadrDistributeEvent xmlns="urn:ietf:params:xml:ns:icalendar-2.0"
  xmlns:ns2="http://docs.oasis-open.org/ns/energyinterop/201110"
  xmlns:ns3="http://docs.oasis-open.org/ns/energyinterop/201110/payloads"
  xmlns:ns4="http://docs.oasis-open.org/ns/emix/2011/06"
  xmlns:ns5="urn:ietf:params:xml:ns:icalendar-2.0:stream" xmlns:ns6="http://openadr.org/oadr-2.0a/2012/07">
  <ns2:eiResponse>
    <ns2:responseCode>200</ns2:responseCode>
    <ns2:responseDescription>OK</ns2:responseDescription>
    <ns3:requestID>f8f0f75e2782e1ed20da</ns3:requestID>
  </ns2:eiResponse>
  <ns3:requestID>7bf0b9951ffcc612b88b</ns3:requestID>
  <ns2:vtnID>TH_VTN</ns2:vtnID>
</ns6:oadrDistributeEvent>

Schema Validation has Passed
Performing OadrDistributeEvent Conformance Rule validation
Conformance Rule Validation Passed
------------------------------------------

Created Event will not be returned as no OadrEvent is present in the OadrDistributeEvent

 Not creating CreatedEvents as the precondition validation failed
----------------RESPONSE---------------------
Current Time : 2018-12-19T02:02:17Z

Returning empty response to VTN

------------------------------------------

----------------REQUEST---------------------
Current Time : 2018-12-19T02:02:25Z

----Client Address---
127.0.0.1

----Header---
[Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2]
[Connection: keep-alive]
[User-Agent: Java/1.7.0_181]
[Content-Type: application/xml]
[Content-Length: 3783]
[Host: host.docker.internal:8081]

<?xml version="1.0" encoding="UTF-8"?>
<ns6:oadrDistributeEvent xmlns="urn:ietf:params:xml:ns:icalendar-2.0"
  xmlns:ns2="http://docs.oasis-open.org/ns/energyinterop/201110"
  xmlns:ns3="http://docs.oasis-open.org/ns/energyinterop/201110/payloads"
  xmlns:ns4="http://docs.oasis-open.org/ns/emix/2011/06"
  xmlns:ns5="urn:ietf:params:xml:ns:icalendar-2.0:stream" xmlns:ns6="http://openadr.org/oadr-2.0a/2012/07">
  <ns2:eiResponse>
    <ns2:responseCode>200</ns2:responseCode>
    <ns2:responseDescription>OK</ns2:responseDescription>
    <ns3:requestID>d6c329382cad716b7d19</ns3:requestID>
  </ns2:eiResponse>
  <ns3:requestID>7484938c9f36000487f3</ns3:requestID>
  <ns2:vtnID>TH_VTN</ns2:vtnID>
  <ns6:oadrEvent>
    <ns2:eiEvent>
      <ns2:eventDescriptor>
        <ns2:eventID>32d0dee1324158c50f2e</ns2:eventID>
        <ns2:modificationNumber>0</ns2:modificationNumber>
        <ns2:priority>0</ns2:priority>
        <ns2:eiMarketContext>
          <ns4:marketContext>http://MarketContext1</ns4:marketContext>
        </ns2:eiMarketContext>
        <ns2:createdDateTime>2018-12-19T02:02:18.000Z</ns2:createdDateTime>
        <ns2:eventStatus>far</ns2:eventStatus>
        <ns2:testEvent>false</ns2:testEvent>
        <ns2:vtnComment/>
      </ns2:eventDescriptor>
      <ns2:eiActivePeriod>
        <properties>
          <dtstart>
            <date-time>2018-12-19T02:04:00.000Z</date-time>
          </dtstart>
          <duration>
            <duration>PT3M</duration>
          </duration>
          <tolerance>
            <tolerate>
              <startafter>PT0M</startafter>
            </tolerate>
          </tolerance>
          <ns2:x-eiNotification>
            <duration>PT0M</duration>
          </ns2:x-eiNotification>
          <ns2:x-eiRampUp>
            <duration>PT0M</duration>
          </ns2:x-eiRampUp>
          <ns2:x-eiRecovery>
            <duration>PT0M</duration>
          </ns2:x-eiRecovery>
        </properties>
        <components
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"/>
      </ns2:eiActivePeriod>
      <ns2:eiEventSignals>
        <ns2:eiEventSignal>
          <ns5:intervals>
            <ns2:interval>
              <duration>
                <duration>PT3M</duration>
              </duration>
              <uid>
                <text>0</text>
              </uid>
              <ns2:signalPayload>
                <ns2:payloadFloat>
                  <ns2:value>0.0</ns2:value>
                </ns2:payloadFloat>
              </ns2:signalPayload>
            </ns2:interval>
          </ns5:intervals>
          <ns2:signalName>simple</ns2:signalName>
          <ns2:signalType>level</ns2:signalType>
          <ns2:signalID>6abdefeffa4a8c9776a6</ns2:signalID>
          <ns2:currentValue>
            <ns2:payloadFloat>
              <ns2:value>0.0</ns2:value>
            </ns2:payloadFloat>
          </ns2:currentValue>
        </ns2:eiEventSignal>
      </ns2:eiEventSignals>
      <ns2:eiTarget>
        <ns2:venID>4a6ebc118931ff05002c</ns2:venID>
      </ns2:eiTarget>
    </ns2:eiEvent>
    <ns6:oadrResponseRequired>always</ns6:oadrResponseRequired>
  </ns6:oadrEvent>
</ns6:oadrDistributeEvent>

Schema Validation has Passed
Performing OadrDistributeEvent Conformance Rule validation
Conformance Rule Validation Passed
------------------------------------------

----------------RESPONSE---------------------
Current Time : 2018-12-19T02:02:26Z

Returning empty response to VTN

------------------------------------------

User action received. Playing Test Case again. :Wed Dec 19 11:02:32 KST 2018

----------------REQUEST---------------------
Current Time : 2018-12-19T02:02:34Z

VTN URL :http://127.0.0.1:8080/OpenADR2/Simple/EiEvent

<?xml version="1.0" encoding="UTF-8"?>
<ns3:oadrCreatedEvent
  xmlns="http://docs.oasis-open.org/ns/energyinterop/201110"
  xmlns:ns2="http://docs.oasis-open.org/ns/energyinterop/201110/payloads" xmlns:ns3="http://openadr.org/oadr-2.0a/2012/07">
  <ns2:eiCreatedEvent>
    <eiResponse>
      <responseCode>200</responseCode>
      <ns2:requestID/>
    </eiResponse>
    <eventResponses>
      <eventResponse>
        <responseCode>200</responseCode>
        <ns2:requestID>7484938c9f36000487f3</ns2:requestID>
        <qualifiedEventID>
          <eventID>32d0dee1324158c50f2e</eventID>
          <modificationNumber>0</modificationNumber>
        </qualifiedEventID>
        <optType>optIn</optType>
      </eventResponse>
    </eventResponses>
    <venID>4a6ebc118931ff05002c</venID>
  </ns2:eiCreatedEvent>
</ns3:oadrCreatedEvent>

Schema Validation has Passed
Performing OadrCreatedEvent Conformance Rule validation
Conformance Rule Validation Passed
------------------------------------------

----------------RESPONSE---------------------
Current Time : 2018-12-19T02:02:34Z

----Header---
[Server: Apache-Coyote/1.1]
[X-UA-Compatible: IE=Edge,chrome=1]
[ETag: "a781188e54acaefdcfd4f2c26b7ddff9"]
[Cache-Control: max-age=0, private, must-revalidate]
[Set-Cookie: _oadr_session=BAh7BkkiD3Nlc3Npb25faWQGOgZFRkkiJTMwZGMyNzYxODdhMTM4NDYyMGY0OTc3Yzk0MjQ4MThkBjsAVA%3D%3D--9fc0539bf1010af5840a81d62666f47da85530f6; path=/; HttpOnly]
[Set-Cookie: oadr_remember_token=; path=/; expires=Thu, 01-Jan-1970 00:00:00 GMT]
[X-Request-Id: ce2e34e4bbd9f27b31743ab1ae3f9020]
[X-Runtime: 0.054000]
[Date: Wed, 19 Dec 2018 02:02:34 GMT]
[X-Rack-Cache: invalidate, pass]
[Content-Type: application/xml;charset=utf-8]
[Content-Length: 627]

<?xml version="1.0" encoding="UTF-8"?>
<ns6:oadrResponse xmlns="urn:ietf:params:xml:ns:icalendar-2.0"
  xmlns:ns2="http://docs.oasis-open.org/ns/energyinterop/201110"
  xmlns:ns3="http://docs.oasis-open.org/ns/energyinterop/201110/payloads"
  xmlns:ns4="http://docs.oasis-open.org/ns/emix/2011/06"
  xmlns:ns5="urn:ietf:params:xml:ns:icalendar-2.0:stream" xmlns:ns6="http://openadr.org/oadr-2.0a/2012/07">
  <ns2:eiResponse>
    <ns2:responseCode>200</ns2:responseCode>
    <ns2:responseDescription/>
    <ns3:requestID/>
  </ns2:eiResponse>
</ns6:oadrResponse>

Schema Validation has Passed
Performing OadrResponse Conformance Rule validation
Conformance Rule Validation Passed
------------------------------------------

Waiting for user action :Wed Dec 19 11:02:35 KST 2018

----------------REQUEST---------------------
Current Time : 2018-12-19T02:02:42Z

----Client Address---
127.0.0.1

----Header---
[Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2]
[Connection: keep-alive]
[User-Agent: Java/1.7.0_181]
[Content-Type: application/xml]
[Content-Length: 3789]
[Host: host.docker.internal:8081]

<?xml version="1.0" encoding="UTF-8"?>
<ns6:oadrDistributeEvent xmlns="urn:ietf:params:xml:ns:icalendar-2.0"
  xmlns:ns2="http://docs.oasis-open.org/ns/energyinterop/201110"
  xmlns:ns3="http://docs.oasis-open.org/ns/energyinterop/201110/payloads"
  xmlns:ns4="http://docs.oasis-open.org/ns/emix/2011/06"
  xmlns:ns5="urn:ietf:params:xml:ns:icalendar-2.0:stream" xmlns:ns6="http://openadr.org/oadr-2.0a/2012/07">
  <ns2:eiResponse>
    <ns2:responseCode>200</ns2:responseCode>
    <ns2:responseDescription>OK</ns2:responseDescription>
    <ns3:requestID>b8de7946faf0456f892f</ns3:requestID>
  </ns2:eiResponse>
  <ns3:requestID>623562db47153bc18bdd</ns3:requestID>
  <ns2:vtnID>TH_VTN</ns2:vtnID>
  <ns6:oadrEvent>
    <ns2:eiEvent>
      <ns2:eventDescriptor>
        <ns2:eventID>32d0dee1324158c50f2e</ns2:eventID>
        <ns2:modificationNumber>1</ns2:modificationNumber>
        <ns2:priority>0</ns2:priority>
        <ns2:eiMarketContext>
          <ns4:marketContext>http://MarketContext1</ns4:marketContext>
        </ns2:eiMarketContext>
        <ns2:createdDateTime>2018-12-19T02:02:18.000Z</ns2:createdDateTime>
        <ns2:eventStatus>cancelled</ns2:eventStatus>
        <ns2:testEvent>false</ns2:testEvent>
        <ns2:vtnComment/>
      </ns2:eventDescriptor>
      <ns2:eiActivePeriod>
        <properties>
          <dtstart>
            <date-time>2018-12-19T02:04:00.000Z</date-time>
          </dtstart>
          <duration>
            <duration>PT3M</duration>
          </duration>
          <tolerance>
            <tolerate>
              <startafter>PT0M</startafter>
            </tolerate>
          </tolerance>
          <ns2:x-eiNotification>
            <duration>PT0M</duration>
          </ns2:x-eiNotification>
          <ns2:x-eiRampUp>
            <duration>PT0M</duration>
          </ns2:x-eiRampUp>
          <ns2:x-eiRecovery>
            <duration>PT0M</duration>
          </ns2:x-eiRecovery>
        </properties>
        <components
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"/>
      </ns2:eiActivePeriod>
      <ns2:eiEventSignals>
        <ns2:eiEventSignal>
          <ns5:intervals>
            <ns2:interval>
              <duration>
                <duration>PT3M</duration>
              </duration>
              <uid>
                <text>0</text>
              </uid>
              <ns2:signalPayload>
                <ns2:payloadFloat>
                  <ns2:value>0.0</ns2:value>
                </ns2:payloadFloat>
              </ns2:signalPayload>
            </ns2:interval>
          </ns5:intervals>
          <ns2:signalName>simple</ns2:signalName>
          <ns2:signalType>level</ns2:signalType>
          <ns2:signalID>6abdefeffa4a8c9776a6</ns2:signalID>
          <ns2:currentValue>
            <ns2:payloadFloat>
              <ns2:value>0.0</ns2:value>
            </ns2:payloadFloat>
          </ns2:currentValue>
        </ns2:eiEventSignal>
      </ns2:eiEventSignals>
      <ns2:eiTarget>
        <ns2:venID>4a6ebc118931ff05002c</ns2:venID>
      </ns2:eiTarget>
    </ns2:eiEvent>
    <ns6:oadrResponseRequired>always</ns6:oadrResponseRequired>
  </ns6:oadrEvent>
</ns6:oadrDistributeEvent>

Schema Validation has Passed
Performing OadrDistributeEvent Conformance Rule validation
Conformance Rule Validation Passed
------------------------------------------

 No more CreatedEvents are available

----------------RESPONSE---------------------
Current Time : 2018-12-19T02:02:43Z

Returning empty response to VTN

------------------------------------------

User action received. Playing Test Case again. :Wed Dec 19 11:02:47 KST 2018

Waiting for user action :Wed Dec 19 11:03:12 KST 2018

User action received. Playing Test Case again. :Wed Dec 19 11:05:18 KST 2018

Checking DistributeEvent for Expected EventStatus, ResponseRequired and ModificationNumber...

Received ResponseRequiredType ALWAYS as expected

Did not receive a Cancelled Event

Test Case has Failed

*** Purging residual traffic ***

Waiting for user action :Wed Dec 19 11:05:18 KST 2018

User action received. Playing Test Case again. :Wed Dec 19 11:05:24 KST 2018
Duckuism commented 5 years ago

3번째 지령에서 2분 기다리라고 하는데, 2분 후에 눌러도 실채. 에러는 세 번째 이벤트 요청이 보내지지 않는다는 에러 발생. 이유 불명확. Expected at least three DistributeEvent. i.e First DistributeEvent,Second Cancelled DistributeEvent and more retries from then

Duckuism commented 5 years ago
update events SET  modification_number = modification_number-1;

위와 같은 커리문으로 modification_number를 감소 시키고, republish로 해결