Child pages
  • GetFile tests
Skip to end of metadata
Go to start of metadata
Describes the tests needed to validate the GetFile functionality.

Basic functionality

Test for the general getFile functionality (Upload a file to test on first)

  1. Attempt to get an existing file from any pillar:
    1. Should be delivered to the file in the directory, where the client is run.
  2. Attempt to get a file from a specific pillar (use -p argument):
    1. Should be delivered to the file in the directory, where the client is run.
  3. Attempt to get the file delivered to a specific directory or file (use -l argument):
    1. Should deliver the file at the given directory or file.

Badcase tests

The following bad case scenarios should be tested to validated that the system handles the requests grazefully, eg. doesn't crash components and sends a informative error message.

  1. Attempt to get a file with an unknown fileID. 
    1. An error should be returned informing the user that no contributors is able to deliver the file.
  2. Attempt to get a file from an unexisting/unknown collection.
    1. Should get an error immediately from the client.
  3. Attempt to get a file from a pillar, which does not exist.
    1. Should get an error immediately from the client.
  4. Attempt to get a file from a checksum-pillar.
    1. The pillar should deliver a negative response.

Open issues

Key P Summary T Created
Loading...
Refresh

  • No labels

5 Comments

  1. I'm using the following command to upload a file: /bin/bitmag.sh put-file -c integrationtest1 -f filename

    And after that i'm using:

    ./bin/bitmag.sh get-file

    Takes the following arguments:

    -s The path to the directory with the settings files for the client

    -k The path to the file containing the private key.

    -v Makes the client more verbose

    -c The id for the collection to perform the operation on.

    -i The id for the file to perform the operation on.

    -p [OPTIONAL] The id of the pillar where the should be performed. If undefined the operations is performed on all pillars.

    -l [OPTIONAL] The location where the file should be placed (either total path or directory). If no argument, then in the directory where the script is located.

  2. Jeg får denne exception skrevet til skærmen, når jeg kalder get-file på en ikke-eksisterende fileId

    ./bin/bitmag.sh get-file -c integrationtest1 -i doom1.wad1
    14:25:35.266 WARN  o.a.a.t.failover.FailoverTransport - Transport (ssl://int-bitmag-01.kb.dk:47777?keepAlive=true) failed, attempting to automatically reconnect
    java.net.SocketException: Connection closed by remote host
        at sun.security.ssl.SSLSocketImpl.checkWrite(SSLSocketImpl.java:1555) ~[na:1.8.0_65]
        at sun.security.ssl.AppOutputStream.write(AppOutputStream.java:71) ~[na:1.8.0_65]
        at org.apache.activemq.transport.tcp.TcpBufferedOutputStream.flush(TcpBufferedOutputStream.java:115) ~[activemq-client-5.12.1.jar:5.12.1]
        at java.io.DataOutputStream.flush(DataOutputStream.java:123) ~[na:1.8.0_65]
        at org.apache.activemq.transport.tcp.TcpTransport.oneway(TcpTransport.java:176) ~[activemq-client-5.12.1.jar:5.12.1]
        at org.apache.activemq.transport.AbstractInactivityMonitor.doOnewaySend(AbstractInactivityMonitor.java:334) ~[activemq-client-5.12.1.jar:5.12.1]
        at org.apache.activemq.transport.AbstractInactivityMonitor.oneway(AbstractInactivityMonitor.java:316) ~[activemq-client-5.12.1.jar:5.12.1]
        at org.apache.activemq.transport.TransportFilter.oneway(TransportFilter.java:85) ~[activemq-client-5.12.1.jar:5.12.1]
        at org.apache.activemq.transport.WireFormatNegotiator.oneway(WireFormatNegotiator.java:104) ~[activemq-client-5.12.1.jar:5.12.1]
        at org.apache.activemq.transport.failover.FailoverTransport.oneway(FailoverTransport.java:668) ~[activemq-client-5.12.1.jar:5.12.1]
        at org.apache.activemq.transport.MutexTransport.oneway(MutexTransport.java:68) [activemq-client-5.12.1.jar:5.12.1]
        at org.apache.activemq.transport.ResponseCorrelator.asyncRequest(ResponseCorrelator.java:81) [activemq-client-5.12.1.jar:5.12.1]
        at org.apache.activemq.transport.ResponseCorrelator.request(ResponseCorrelator.java:86) [activemq-client-5.12.1.jar:5.12.1]
        at org.apache.activemq.ActiveMQConnection.syncSendPacket(ActiveMQConnection.java:1387) [activemq-client-5.12.1.jar:5.12.1]
        at org.apache.activemq.ActiveMQConnection.ensureConnectionInfoSent(ActiveMQConnection.java:1501) [activemq-client-5.12.1.jar:5.12.1]
        at org.apache.activemq.ActiveMQConnection.setClientID(ActiveMQConnection.java:413) [activemq-client-5.12.1.jar:5.12.1]
        at org.bitrepository.protocol.activemq.ActiveMQMessageBus.<init>(ActiveMQMessageBus.java:149) [bitrepository-core-1.6-SNAPSHOT.jar:1.6-SNAPSHOT]
        at org.bitrepository.protocol.messagebus.MessageBusManager.createMessageBus(MessageBusManager.java:79) [bitrepository-core-1.6-SNAPSHOT.jar:1.6-SNAPSHOT]
        at org.bitrepository.protocol.messagebus.MessageBusManager.getMessageBus(MessageBusManager.java:62) [bitrepository-core-1.6-SNAPSHOT.jar:1.6-SNAPSHOT]
        at org.bitrepository.protocol.ProtocolComponentFactory.getMessageBus(ProtocolComponentFactory.java:70) [bitrepository-core-1.6-SNAPSHOT.jar:1.6-SNAPSHOT]
        at org.bitrepository.access.AccessComponentFactory.createGetFileClient(AccessComponentFactory.java:79) [bitrepository-client-1.6-SNAPSHOT.jar:1.6-SNAPSHOT]
        at org.bitrepository.commandline.GetFileCmd.<init>(GetFileCmd.java:68) [bitrepository-client-1.6-SNAPSHOT.jar:1.6-SNAPSHOT]
        at org.bitrepository.commandline.GetFileCmd.main(GetFileCmd.java:53) [bitrepository-client-1.6-SNAPSHOT.jar:1.6-SNAPSHOT]
    Failure: 3e404a92: GET_FILE for file doom1.wad1: FAILED: , Unable to continue operation, contributors unavailable.

    1. fejlen optræder ikke denne gang

  3. Får denne fejl ved bad-case-test

    ./bin/bitmag.sh get-file -c integrationtest1 -i doom1.wad -p checksum2

    14:31:35.912 WARN  o.a.a.t.failover.FailoverTransport - Transport (ssl://int-bitmag-01.kb.dk:47777?keepAlive=true) failed, attempting to automatically reconnect
    java.net.SocketException: Connection closed by remote host
        at sun.security.ssl.SSLSocketImpl.checkWrite(SSLSocketImpl.java:1555) ~[na:1.8.0_65]
        at sun.security.ssl.AppOutputStream.write(AppOutputStream.java:71) ~[na:1.8.0_65]
        at org.apache.activemq.transport.tcp.TcpBufferedOutputStream.flush(TcpBufferedOutputStream.java:115) ~[activemq-client-5.12.1.jar:5.12.1]
        at java.io.DataOutputStream.flush(DataOutputStream.java:123) ~[na:1.8.0_65]
        at org.apache.activemq.transport.tcp.TcpTransport.oneway(TcpTransport.java:176) ~[activemq-client-5.12.1.jar:5.12.1]
        at org.apache.activemq.transport.AbstractInactivityMonitor.doOnewaySend(AbstractInactivityMonitor.java:334) ~[activemq-client-5.12.1.jar:5.12.1]
        at org.apache.activemq.transport.AbstractInactivityMonitor.oneway(AbstractInactivityMonitor.java:316) ~[activemq-client-5.12.1.jar:5.12.1]
        at org.apache.activemq.transport.TransportFilter.oneway(TransportFilter.java:85) ~[activemq-client-5.12.1.jar:5.12.1]
        at org.apache.activemq.transport.WireFormatNegotiator.oneway(WireFormatNegotiator.java:104) ~[activemq-client-5.12.1.jar:5.12.1]
        at org.apache.activemq.transport.failover.FailoverTransport.oneway(FailoverTransport.java:668) ~[activemq-client-5.12.1.jar:5.12.1]
        at org.apache.activemq.transport.MutexTransport.oneway(MutexTransport.java:68) [activemq-client-5.12.1.jar:5.12.1]
        at org.apache.activemq.transport.ResponseCorrelator.asyncRequest(ResponseCorrelator.java:81) [activemq-client-5.12.1.jar:5.12.1]
        at org.apache.activemq.transport.ResponseCorrelator.request(ResponseCorrelator.java:86) [activemq-client-5.12.1.jar:5.12.1]
        at org.apache.activemq.ActiveMQConnection.syncSendPacket(ActiveMQConnection.java:1387) [activemq-client-5.12.1.jar:5.12.1]
        at org.apache.activemq.ActiveMQConnection.ensureConnectionInfoSent(ActiveMQConnection.java:1501) [activemq-client-5.12.1.jar:5.12.1]
        at org.apache.activemq.ActiveMQConnection.setClientID(ActiveMQConnection.java:413) [activemq-client-5.12.1.jar:5.12.1]
        at org.bitrepository.protocol.activemq.ActiveMQMessageBus.<init>(ActiveMQMessageBus.java:149) [bitrepository-core-1.6-SNAPSHOT.jar:1.6-SNAPSHOT]
        at org.bitrepository.protocol.messagebus.MessageBusManager.createMessageBus(MessageBusManager.java:79) [bitrepository-core-1.6-SNAPSHOT.jar:1.6-SNAPSHOT]
        at org.bitrepository.protocol.messagebus.MessageBusManager.getMessageBus(MessageBusManager.java:62) [bitrepository-core-1.6-SNAPSHOT.jar:1.6-SNAPSHOT]
        at org.bitrepository.protocol.ProtocolComponentFactory.getMessageBus(ProtocolComponentFactory.java:70) [bitrepository-core-1.6-SNAPSHOT.jar:1.6-SNAPSHOT]
        at org.bitrepository.access.AccessComponentFactory.createGetFileClient(AccessComponentFactory.java:79) [bitrepository-client-1.6-SNAPSHOT.jar:1.6-SNAPSHOT]
        at org.bitrepository.commandline.GetFileCmd.<init>(GetFileCmd.java:68) [bitrepository-client-1.6-SNAPSHOT.jar:1.6-SNAPSHOT]
        at org.bitrepository.commandline.GetFileCmd.main(GetFileCmd.java:53) [bitrepository-client-1.6-SNAPSHOT.jar:1.6-SNAPSHOT]
    Failure: b06e1d4d: GET_FILE for file doom1.wad: FAILED: , Unable to continue operation, contributors unavailable.

    1. fejlen optræder ikke denne gang