| 1 | { |
| 2 | "description": "loadbalanced-logging", |
| 3 | "schemaVersion": "1.16", |
| 4 | "runOnRequirements": [ |
| 5 | { |
| 6 | "topologies": [ |
| 7 | "load-balanced" |
| 8 | ], |
| 9 | "minServerVersion": "4.4" |
| 10 | } |
| 11 | ], |
| 12 | "tests": [ |
| 13 | { |
| 14 | "description": "Topology lifecycle", |
| 15 | "operations": [ |
| 16 | { |
| 17 | "name": "createEntities", |
| 18 | "object": "testRunner", |
| 19 | "arguments": { |
| 20 | "entities": [ |
| 21 | { |
| 22 | "client": { |
| 23 | "id": "client", |
| 24 | "observeLogMessages": { |
| 25 | "topology": "debug" |
| 26 | }, |
| 27 | "observeEvents": [ |
| 28 | "topologyDescriptionChangedEvent" |
| 29 | ] |
| 30 | } |
| 31 | } |
| 32 | ] |
| 33 | } |
| 34 | }, |
| 35 | { |
| 36 | "name": "waitForEvent", |
| 37 | "object": "testRunner", |
| 38 | "arguments": { |
| 39 | "client": "client", |
| 40 | "event": { |
| 41 | "topologyDescriptionChangedEvent": {} |
| 42 | }, |
| 43 | "count": 2 |
| 44 | } |
| 45 | }, |
| 46 | { |
| 47 | "name": "close", |
| 48 | "object": "client" |
| 49 | } |
| 50 | ], |
| 51 | "expectLogMessages": [ |
| 52 | { |
| 53 | "client": "client", |
| 54 | "messages": [ |
| 55 | { |
| 56 | "level": "debug", |
| 57 | "component": "topology", |
| 58 | "data": { |
| 59 | "message": "Starting topology monitoring", |
| 60 | "topologyId": { |
| 61 | "$$exists": true |
| 62 | } |
| 63 | } |
| 64 | }, |
| 65 | { |
| 66 | "level": "debug", |
| 67 | "component": "topology", |
| 68 | "data": { |
| 69 | "message": "Topology description changed", |
| 70 | "topologyId": { |
| 71 | "$$exists": true |
| 72 | }, |
| 73 | "previousDescription": { |
| 74 | "$$exists": true |
| 75 | }, |
| 76 | "newDescription": { |
| 77 | "$$exists": true |
| 78 | } |
| 79 | } |
| 80 | }, |
| 81 | { |
| 82 | "level": "debug", |
| 83 | "component": "topology", |
| 84 | "data": { |
| 85 | "message": "Starting server monitoring", |
| 86 | "topologyId": { |
| 87 | "$$exists": true |
| 88 | }, |
| 89 | "serverHost": { |
| 90 | "$$type": "string" |
| 91 | }, |
| 92 | "serverPort": { |
| 93 | "$$type": [ |
| 94 | "int", |
| 95 | "long" |
| 96 | ] |
| 97 | } |
| 98 | } |
| 99 | }, |
| 100 | { |
| 101 | "level": "debug", |
| 102 | "component": "topology", |
| 103 | "data": { |
| 104 | "message": "Topology description changed", |
| 105 | "topologyId": { |
| 106 | "$$exists": true |
| 107 | }, |
| 108 | "previousDescription": { |
| 109 | "$$exists": true |
| 110 | }, |
| 111 | "newDescription": { |
| 112 | "$$exists": true |
| 113 | } |
| 114 | } |
| 115 | }, |
| 116 | { |
| 117 | "level": "debug", |
| 118 | "component": "topology", |
| 119 | "data": { |
| 120 | "message": "Stopped server monitoring", |
| 121 | "topologyId": { |
| 122 | "$$exists": true |
| 123 | }, |
| 124 | "serverHost": { |
| 125 | "$$type": "string" |
| 126 | }, |
| 127 | "serverPort": { |
| 128 | "$$type": [ |
| 129 | "int", |
| 130 | "long" |
| 131 | ] |
| 132 | } |
| 133 | } |
| 134 | }, |
| 135 | { |
| 136 | "level": "debug", |
| 137 | "component": "topology", |
| 138 | "data": { |
| 139 | "message": "Stopped topology monitoring", |
| 140 | "topologyId": { |
| 141 | "$$exists": true |
| 142 | } |
| 143 | } |
| 144 | } |
| 145 | ] |
| 146 | } |
| 147 | ] |
| 148 | } |
| 149 | ] |
| 150 | } |