Felix Meschberger | 47eb037 | 2009-07-28 13:48:28 +0000 | [diff] [blame] | 1 | /* |
| 2 | * Licensed to the Apache Software Foundation (ASF) under one |
| 3 | * or more contributor license agreements. See the NOTICE file |
| 4 | * distributed with this work for additional information |
| 5 | * regarding copyright ownership. The ASF licenses this file |
| 6 | * to you under the Apache License, Version 2.0 (the |
| 7 | * "License"); you may not use this file except in compliance |
| 8 | * with the License. You may obtain a copy of the License at |
| 9 | * |
| 10 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 11 | * |
| 12 | * Unless required by applicable law or agreed to in writing, |
| 13 | * software distributed under the License is distributed on an |
| 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
| 15 | * KIND, either express or implied. See the License for the |
| 16 | * specific language governing permissions and limitations |
| 17 | * under the License. |
| 18 | */ |
| 19 | package org.apache.felix.scr.integration; |
| 20 | |
| 21 | |
David Jencks | b899d73 | 2014-06-15 01:10:18 +0000 | [diff] [blame] | 22 | import java.util.Arrays; |
David Jencks | c4773f2 | 2014-06-15 01:09:31 +0000 | [diff] [blame] | 23 | import java.util.Collection; |
David Jencks | b899d73 | 2014-06-15 01:10:18 +0000 | [diff] [blame] | 24 | import java.util.Collections; |
David Jencks | c4773f2 | 2014-06-15 01:09:31 +0000 | [diff] [blame] | 25 | |
| 26 | import junit.framework.Assert; |
Felix Meschberger | 47eb037 | 2009-07-28 13:48:28 +0000 | [diff] [blame] | 27 | import junit.framework.TestCase; |
| 28 | |
Felix Meschberger | 47eb037 | 2009-07-28 13:48:28 +0000 | [diff] [blame] | 29 | import org.apache.felix.scr.integration.components.SimpleComponent; |
Felix Meschberger | 738751a | 2012-05-31 16:51:54 +0000 | [diff] [blame] | 30 | import org.apache.felix.scr.integration.components.SimpleServiceImpl; |
Felix Meschberger | 47eb037 | 2009-07-28 13:48:28 +0000 | [diff] [blame] | 31 | import org.junit.Test; |
| 32 | import org.junit.runner.RunWith; |
Felix Meschberger | 47eb037 | 2009-07-28 13:48:28 +0000 | [diff] [blame] | 33 | import org.ops4j.pax.exam.junit.JUnit4TestRunner; |
Felix Meschberger | 47eb037 | 2009-07-28 13:48:28 +0000 | [diff] [blame] | 34 | import org.osgi.framework.Constants; |
David Jencks | c4773f2 | 2014-06-15 01:09:31 +0000 | [diff] [blame] | 35 | import org.osgi.service.component.runtime.dto.ComponentConfigurationDTO; |
Felix Meschberger | 47eb037 | 2009-07-28 13:48:28 +0000 | [diff] [blame] | 36 | |
| 37 | |
| 38 | @RunWith(JUnit4TestRunner.class) |
Felix Meschberger | a6ad976 | 2009-08-19 13:38:56 +0000 | [diff] [blame] | 39 | public class ComponentConfigurationTest extends ComponentTestBase |
Felix Meschberger | 47eb037 | 2009-07-28 13:48:28 +0000 | [diff] [blame] | 40 | { |
Felix Meschberger | 2e88542 | 2009-08-21 11:35:00 +0000 | [diff] [blame] | 41 | static |
| 42 | { |
| 43 | // uncomment to enable debugging of this test class |
David Jencks | a4af0eb | 2013-01-29 06:54:24 +0000 | [diff] [blame] | 44 | // paxRunnerVmOption = DEBUG_VM_OPTION; |
Felix Meschberger | 2e88542 | 2009-08-21 11:35:00 +0000 | [diff] [blame] | 45 | } |
| 46 | |
Felix Meschberger | 47eb037 | 2009-07-28 13:48:28 +0000 | [diff] [blame] | 47 | |
Felix Meschberger | 47eb037 | 2009-07-28 13:48:28 +0000 | [diff] [blame] | 48 | @Test |
David Jencks | bae4484 | 2014-06-21 20:15:24 +0000 | [diff] [blame] | 49 | public void test_SimpleComponent_configuration_ignore() throws Exception |
Felix Meschberger | 47eb037 | 2009-07-28 13:48:28 +0000 | [diff] [blame] | 50 | { |
Felix Meschberger | 470a975 | 2009-11-25 14:51:21 +0000 | [diff] [blame] | 51 | final String pid = "SimpleComponent.configuration.ignore"; |
David Jencks | c4773f2 | 2014-06-15 01:09:31 +0000 | [diff] [blame] | 52 | TestCase.assertNull( SimpleComponent.INSTANCE ); |
Felix Meschberger | 470a975 | 2009-11-25 14:51:21 +0000 | [diff] [blame] | 53 | |
| 54 | deleteConfig( pid ); |
| 55 | delay(); |
| 56 | |
David Jencks | c4773f2 | 2014-06-15 01:09:31 +0000 | [diff] [blame] | 57 | ComponentConfigurationDTO cc = getDisabledConfigurationAndEnable(pid, ComponentConfigurationDTO.ACTIVE); |
| 58 | |
Felix Meschberger | 470a975 | 2009-11-25 14:51:21 +0000 | [diff] [blame] | 59 | TestCase.assertNotNull( SimpleComponent.INSTANCE ); |
| 60 | TestCase.assertNull( SimpleComponent.INSTANCE.getProperty( PROP_NAME ) ); |
| 61 | |
| 62 | configure( pid ); |
| 63 | delay(); |
| 64 | |
David Jencks | c4773f2 | 2014-06-15 01:09:31 +0000 | [diff] [blame] | 65 | findComponentConfigurationByName(pid, ComponentConfigurationDTO.ACTIVE); |
Felix Meschberger | 470a975 | 2009-11-25 14:51:21 +0000 | [diff] [blame] | 66 | TestCase.assertNotNull( SimpleComponent.INSTANCE ); |
| 67 | TestCase.assertNull( SimpleComponent.INSTANCE.getProperty( PROP_NAME ) ); |
| 68 | |
| 69 | deleteConfig( pid ); |
| 70 | delay(); |
| 71 | |
David Jencks | c4773f2 | 2014-06-15 01:09:31 +0000 | [diff] [blame] | 72 | findComponentConfigurationByName(pid, ComponentConfigurationDTO.ACTIVE); |
Felix Meschberger | 470a975 | 2009-11-25 14:51:21 +0000 | [diff] [blame] | 73 | TestCase.assertNotNull( SimpleComponent.INSTANCE ); |
| 74 | TestCase.assertNull( SimpleComponent.INSTANCE.getProperty( PROP_NAME ) ); |
| 75 | |
David Jencks | c4773f2 | 2014-06-15 01:09:31 +0000 | [diff] [blame] | 76 | disableAndCheck( cc ); |
Felix Meschberger | 470a975 | 2009-11-25 14:51:21 +0000 | [diff] [blame] | 77 | TestCase.assertNull( SimpleComponent.INSTANCE ); |
Felix Meschberger | 4dab8ea | 2009-07-31 14:44:12 +0000 | [diff] [blame] | 78 | } |
Felix Meschberger | 47eb037 | 2009-07-28 13:48:28 +0000 | [diff] [blame] | 79 | |
Felix Meschberger | 47eb037 | 2009-07-28 13:48:28 +0000 | [diff] [blame] | 80 | |
Felix Meschberger | 4dab8ea | 2009-07-31 14:44:12 +0000 | [diff] [blame] | 81 | @Test |
David Jencks | bae4484 | 2014-06-21 20:15:24 +0000 | [diff] [blame] | 82 | public void test_SimpleComponent_configuration_optional() throws Exception |
Felix Meschberger | 4dab8ea | 2009-07-31 14:44:12 +0000 | [diff] [blame] | 83 | { |
Felix Meschberger | 470a975 | 2009-11-25 14:51:21 +0000 | [diff] [blame] | 84 | final String pid = "SimpleComponent.configuration.optional"; |
David Jencks | c4773f2 | 2014-06-15 01:09:31 +0000 | [diff] [blame] | 85 | ComponentConfigurationDTO cc = getDisabledConfigurationAndEnable(pid, ComponentConfigurationDTO.ACTIVE); |
Felix Meschberger | 470a975 | 2009-11-25 14:51:21 +0000 | [diff] [blame] | 86 | |
| 87 | final SimpleComponent firstInstance = SimpleComponent.INSTANCE; |
Felix Meschberger | 470a975 | 2009-11-25 14:51:21 +0000 | [diff] [blame] | 88 | TestCase.assertNotNull( firstInstance ); |
| 89 | TestCase.assertNull( firstInstance.getProperty( PROP_NAME ) ); |
| 90 | |
| 91 | configure( pid ); |
| 92 | delay(); |
| 93 | |
| 94 | final SimpleComponent secondInstance = SimpleComponent.INSTANCE; |
David Jencks | c4773f2 | 2014-06-15 01:09:31 +0000 | [diff] [blame] | 95 | findComponentConfigurationByName(pid, ComponentConfigurationDTO.ACTIVE); |
Felix Meschberger | 470a975 | 2009-11-25 14:51:21 +0000 | [diff] [blame] | 96 | TestCase.assertNotNull( secondInstance ); |
| 97 | TestCase.assertEquals( PROP_NAME, secondInstance.getProperty( PROP_NAME ) ); |
| 98 | |
| 99 | deleteConfig( pid ); |
| 100 | delay(); |
| 101 | |
| 102 | final SimpleComponent thirdInstance = SimpleComponent.INSTANCE; |
David Jencks | c4773f2 | 2014-06-15 01:09:31 +0000 | [diff] [blame] | 103 | findComponentConfigurationByName(pid, ComponentConfigurationDTO.ACTIVE); |
Felix Meschberger | 470a975 | 2009-11-25 14:51:21 +0000 | [diff] [blame] | 104 | TestCase.assertNotNull( thirdInstance ); |
| 105 | TestCase.assertNull( thirdInstance.getProperty( PROP_NAME ) ); |
| 106 | |
| 107 | TestCase.assertNotSame( "Expect new instance object after reconfiguration", firstInstance, secondInstance ); |
| 108 | TestCase.assertNotSame( "Expect new instance object after configuration deletion (1)", firstInstance, |
| 109 | thirdInstance ); |
| 110 | TestCase.assertNotSame( "Expect new instance object after configuration deletion (2)", secondInstance, |
| 111 | thirdInstance ); |
| 112 | |
David Jencks | c4773f2 | 2014-06-15 01:09:31 +0000 | [diff] [blame] | 113 | disableAndCheck( cc ); |
Felix Meschberger | 470a975 | 2009-11-25 14:51:21 +0000 | [diff] [blame] | 114 | TestCase.assertNull( SimpleComponent.INSTANCE ); |
Felix Meschberger | 4dab8ea | 2009-07-31 14:44:12 +0000 | [diff] [blame] | 115 | } |
Felix Meschberger | 47eb037 | 2009-07-28 13:48:28 +0000 | [diff] [blame] | 116 | |
Felix Meschberger | 47eb037 | 2009-07-28 13:48:28 +0000 | [diff] [blame] | 117 | |
Felix Meschberger | 4dab8ea | 2009-07-31 14:44:12 +0000 | [diff] [blame] | 118 | @Test |
David Jencks | bae4484 | 2014-06-21 20:15:24 +0000 | [diff] [blame] | 119 | public void test_SimpleComponent_configuration_require() throws Exception |
Felix Meschberger | 4dab8ea | 2009-07-31 14:44:12 +0000 | [diff] [blame] | 120 | { |
Felix Meschberger | 470a975 | 2009-11-25 14:51:21 +0000 | [diff] [blame] | 121 | final String pid = "SimpleComponent.configuration.require"; |
Felix Meschberger | 470a975 | 2009-11-25 14:51:21 +0000 | [diff] [blame] | 122 | |
| 123 | deleteConfig( pid ); |
| 124 | delay(); |
David Jencks | c4773f2 | 2014-06-15 01:09:31 +0000 | [diff] [blame] | 125 | |
Felix Meschberger | 470a975 | 2009-11-25 14:51:21 +0000 | [diff] [blame] | 126 | TestCase.assertNull( SimpleComponent.INSTANCE ); |
| 127 | |
David Jencks | c4773f2 | 2014-06-15 01:09:31 +0000 | [diff] [blame] | 128 | getConfigurationsDisabledThenEnable(pid, 0, ComponentConfigurationDTO.UNSATISFIED); |
Felix Meschberger | 470a975 | 2009-11-25 14:51:21 +0000 | [diff] [blame] | 129 | TestCase.assertNull( SimpleComponent.INSTANCE ); |
| 130 | |
| 131 | configure( pid ); |
| 132 | delay(); |
| 133 | |
David Jencks | c4773f2 | 2014-06-15 01:09:31 +0000 | [diff] [blame] | 134 | ComponentConfigurationDTO cc = findComponentConfigurationByName(pid, ComponentConfigurationDTO.ACTIVE); |
Felix Meschberger | 470a975 | 2009-11-25 14:51:21 +0000 | [diff] [blame] | 135 | TestCase.assertNotNull( SimpleComponent.INSTANCE ); |
| 136 | TestCase.assertEquals( PROP_NAME, SimpleComponent.INSTANCE.getProperty( PROP_NAME ) ); |
| 137 | |
| 138 | deleteConfig( pid ); |
| 139 | delay(); |
| 140 | |
David Jencks | c4773f2 | 2014-06-15 01:09:31 +0000 | [diff] [blame] | 141 | checkConfigurationCount(pid, 0, -1); |
Felix Meschberger | 470a975 | 2009-11-25 14:51:21 +0000 | [diff] [blame] | 142 | TestCase.assertNull( SimpleComponent.INSTANCE ); |
| 143 | |
David Jencks | c4773f2 | 2014-06-15 01:09:31 +0000 | [diff] [blame] | 144 | disableAndCheck( cc ); |
Felix Meschberger | 470a975 | 2009-11-25 14:51:21 +0000 | [diff] [blame] | 145 | TestCase.assertNull( SimpleComponent.INSTANCE ); |
Felix Meschberger | 4dab8ea | 2009-07-31 14:44:12 +0000 | [diff] [blame] | 146 | } |
Felix Meschberger | 47eb037 | 2009-07-28 13:48:28 +0000 | [diff] [blame] | 147 | |
David Jencks | d02418a | 2014-06-15 01:10:02 +0000 | [diff] [blame] | 148 | /** |
| 149 | * same as test_SimpleComponent_configuration_require except configuration is present when component is enabled. |
| 150 | */ |
| 151 | @Test |
David Jencks | bae4484 | 2014-06-21 20:15:24 +0000 | [diff] [blame] | 152 | public void test_SimpleComponent_configuration_require_initialize() throws Exception |
David Jencks | d02418a | 2014-06-15 01:10:02 +0000 | [diff] [blame] | 153 | { |
| 154 | final String pid = "SimpleComponent.configuration.require"; |
| 155 | |
| 156 | deleteConfig( pid ); |
| 157 | configure( pid ); |
| 158 | delay(); |
| 159 | |
| 160 | TestCase.assertNull( SimpleComponent.INSTANCE ); |
| 161 | |
| 162 | ComponentConfigurationDTO cc = getConfigurationsDisabledThenEnable(pid, 1, ComponentConfigurationDTO.ACTIVE).iterator().next(); |
| 163 | |
| 164 | TestCase.assertNotNull( SimpleComponent.INSTANCE ); |
| 165 | TestCase.assertEquals( PROP_NAME, SimpleComponent.INSTANCE.getProperty( PROP_NAME ) ); |
| 166 | |
| 167 | deleteConfig( pid ); |
| 168 | delay(); |
| 169 | |
| 170 | checkConfigurationCount(pid, 0, -1); |
| 171 | TestCase.assertNull( SimpleComponent.INSTANCE ); |
| 172 | |
| 173 | disableAndCheck( cc ); |
| 174 | TestCase.assertNull( SimpleComponent.INSTANCE ); |
| 175 | } |
| 176 | |
Felix Meschberger | 4dab8ea | 2009-07-31 14:44:12 +0000 | [diff] [blame] | 177 | |
| 178 | @Test |
David Jencks | bae4484 | 2014-06-21 20:15:24 +0000 | [diff] [blame] | 179 | public void test_SimpleComponent_dynamic_configuration() throws Exception |
Felix Meschberger | 4dab8ea | 2009-07-31 14:44:12 +0000 | [diff] [blame] | 180 | { |
Felix Meschberger | 470a975 | 2009-11-25 14:51:21 +0000 | [diff] [blame] | 181 | final String pid = "DynamicConfigurationComponent"; |
David Jencks | acb8321 | 2014-04-30 18:01:44 +0000 | [diff] [blame] | 182 | boolean pre13 = true; |
David Jencks | b899d73 | 2014-06-15 01:10:18 +0000 | [diff] [blame] | 183 | boolean recreateOnDelete = true; |
| 184 | dynamicConfigTest(pid, pre13, recreateOnDelete); |
David Jencks | acb8321 | 2014-04-30 18:01:44 +0000 | [diff] [blame] | 185 | } |
| 186 | |
| 187 | @Test |
David Jencks | bae4484 | 2014-06-21 20:15:24 +0000 | [diff] [blame] | 188 | public void test_SimpleComponent_dynamic_configuration_13() throws Exception |
David Jencks | acb8321 | 2014-04-30 18:01:44 +0000 | [diff] [blame] | 189 | { |
| 190 | final String pid = "DynamicConfigurationComponent13"; |
| 191 | boolean pre13 = false; |
David Jencks | b899d73 | 2014-06-15 01:10:18 +0000 | [diff] [blame] | 192 | boolean recreateOnDelete = false; |
| 193 | dynamicConfigTest(pid, pre13, recreateOnDelete); |
David Jencks | acb8321 | 2014-04-30 18:01:44 +0000 | [diff] [blame] | 194 | } |
| 195 | |
| 196 | @Test |
David Jencks | bae4484 | 2014-06-21 20:15:24 +0000 | [diff] [blame] | 197 | public void test_SimpleComponent_dynamic_configuration_flag() throws Exception |
David Jencks | acb8321 | 2014-04-30 18:01:44 +0000 | [diff] [blame] | 198 | { |
| 199 | final String pid = "DynamicConfigurationComponentFlag"; |
David Jencks | b899d73 | 2014-06-15 01:10:18 +0000 | [diff] [blame] | 200 | boolean pre13 = true; |
| 201 | boolean recreateOnDelete = false; |
| 202 | dynamicConfigTest(pid, pre13, recreateOnDelete); |
David Jencks | acb8321 | 2014-04-30 18:01:44 +0000 | [diff] [blame] | 203 | } |
| 204 | |
| 205 | |
David Jencks | bae4484 | 2014-06-21 20:15:24 +0000 | [diff] [blame] | 206 | private void dynamicConfigTest(final String pid, boolean pre13, boolean recreateOnDelete) throws Exception |
| 207 | { |
David Jencks | b899d73 | 2014-06-15 01:10:18 +0000 | [diff] [blame] | 208 | Object pidWithout; |
| 209 | Object pidWith; |
| 210 | if (pre13) |
| 211 | { |
| 212 | pidWithout = pid + ".description"; |
| 213 | pidWith = pid; |
| 214 | } |
| 215 | else |
| 216 | { |
| 217 | pidWithout = Collections.singletonList(pid + ".description"); |
| 218 | pidWith = Arrays.asList(new String[] {pid + ".description", pid}); |
| 219 | } |
Felix Meschberger | 470a975 | 2009-11-25 14:51:21 +0000 | [diff] [blame] | 220 | deleteConfig( pid ); |
| 221 | delay(); |
| 222 | |
David Jencks | c4773f2 | 2014-06-15 01:09:31 +0000 | [diff] [blame] | 223 | ComponentConfigurationDTO cc = getDisabledConfigurationAndEnable(pid, ComponentConfigurationDTO.ACTIVE); |
Felix Meschberger | 470a975 | 2009-11-25 14:51:21 +0000 | [diff] [blame] | 224 | |
Felix Meschberger | 470a975 | 2009-11-25 14:51:21 +0000 | [diff] [blame] | 225 | TestCase.assertNotNull( SimpleComponent.INSTANCE ); |
| 226 | TestCase.assertNull( SimpleComponent.INSTANCE.getProperty( PROP_NAME ) ); |
David Jencks | b899d73 | 2014-06-15 01:10:18 +0000 | [diff] [blame] | 227 | TestCase.assertEquals(pidWithout, SimpleComponent.INSTANCE.getProperty(Constants.SERVICE_PID)); |
Felix Meschberger | 470a975 | 2009-11-25 14:51:21 +0000 | [diff] [blame] | 228 | |
| 229 | final SimpleComponent instance = SimpleComponent.INSTANCE; |
| 230 | |
| 231 | configure( pid ); |
| 232 | delay(); |
| 233 | |
David Jencks | c4773f2 | 2014-06-15 01:09:31 +0000 | [diff] [blame] | 234 | findComponentConfigurationByName(pid, ComponentConfigurationDTO.ACTIVE); |
Felix Meschberger | 470a975 | 2009-11-25 14:51:21 +0000 | [diff] [blame] | 235 | TestCase.assertEquals( instance, SimpleComponent.INSTANCE ); |
| 236 | TestCase.assertEquals( PROP_NAME, SimpleComponent.INSTANCE.getProperty( PROP_NAME ) ); |
David Jencks | b899d73 | 2014-06-15 01:10:18 +0000 | [diff] [blame] | 237 | TestCase.assertEquals(pidWith, SimpleComponent.INSTANCE.getProperty(Constants.SERVICE_PID)); |
Felix Meschberger | 470a975 | 2009-11-25 14:51:21 +0000 | [diff] [blame] | 238 | |
| 239 | deleteConfig( pid ); |
| 240 | delay(); |
| 241 | |
David Jencks | c4773f2 | 2014-06-15 01:09:31 +0000 | [diff] [blame] | 242 | findComponentConfigurationByName(pid, ComponentConfigurationDTO.ACTIVE); |
David Jencks | b899d73 | 2014-06-15 01:10:18 +0000 | [diff] [blame] | 243 | if (recreateOnDelete) |
David Jencks | acb8321 | 2014-04-30 18:01:44 +0000 | [diff] [blame] | 244 | { |
| 245 | TestCase.assertNotSame( instance, SimpleComponent.INSTANCE ); |
| 246 | } |
| 247 | else |
| 248 | { |
| 249 | TestCase.assertSame( instance, SimpleComponent.INSTANCE ); |
| 250 | } |
Felix Meschberger | 470a975 | 2009-11-25 14:51:21 +0000 | [diff] [blame] | 251 | TestCase.assertNull( SimpleComponent.INSTANCE.getProperty( PROP_NAME ) ); |
David Jencks | b899d73 | 2014-06-15 01:10:18 +0000 | [diff] [blame] | 252 | TestCase.assertEquals(pidWithout, SimpleComponent.INSTANCE.getProperty(Constants.SERVICE_PID)); |
Felix Meschberger | 470a975 | 2009-11-25 14:51:21 +0000 | [diff] [blame] | 253 | |
David Jencks | c4773f2 | 2014-06-15 01:09:31 +0000 | [diff] [blame] | 254 | disableAndCheck( cc ); |
Felix Meschberger | 470a975 | 2009-11-25 14:51:21 +0000 | [diff] [blame] | 255 | TestCase.assertNull( SimpleComponent.INSTANCE ); |
David Jencks | acb8321 | 2014-04-30 18:01:44 +0000 | [diff] [blame] | 256 | } |
Felix Meschberger | 4dab8ea | 2009-07-31 14:44:12 +0000 | [diff] [blame] | 257 | |
| 258 | |
| 259 | @Test |
David Jencks | bae4484 | 2014-06-21 20:15:24 +0000 | [diff] [blame] | 260 | public void test_SimpleComponent_dynamic_optional_configuration_with_required_service() throws Exception |
Felix Meschberger | 738751a | 2012-05-31 16:51:54 +0000 | [diff] [blame] | 261 | { |
| 262 | final String targetProp = "ref.target"; |
| 263 | final String filterProp = "required"; |
| 264 | final SimpleServiceImpl service = SimpleServiceImpl.create( bundleContext, "sample" ).setFilterProperty( filterProp ); |
| 265 | try |
| 266 | { |
| 267 | final String pid = "DynamicConfigurationComponentWithRequiredReference"; |
Felix Meschberger | 738751a | 2012-05-31 16:51:54 +0000 | [diff] [blame] | 268 | deleteConfig( pid ); |
| 269 | delay(); |
| 270 | |
Felix Meschberger | 738751a | 2012-05-31 16:51:54 +0000 | [diff] [blame] | 271 | // mandatory ref missing --> component unsatisfied |
David Jencks | c4773f2 | 2014-06-15 01:09:31 +0000 | [diff] [blame] | 272 | ComponentConfigurationDTO cc = getDisabledConfigurationAndEnable(pid, ComponentConfigurationDTO.UNSATISFIED); |
Felix Meschberger | 738751a | 2012-05-31 16:51:54 +0000 | [diff] [blame] | 273 | |
| 274 | // dynamically configure without the correct target |
| 275 | configure( pid ); |
| 276 | delay(); |
| 277 | |
| 278 | // mandatory ref missing --> component unsatisfied |
David Jencks | c4773f2 | 2014-06-15 01:09:31 +0000 | [diff] [blame] | 279 | findComponentConfigurationByName(pid, ComponentConfigurationDTO.UNSATISFIED); |
Felix Meschberger | 738751a | 2012-05-31 16:51:54 +0000 | [diff] [blame] | 280 | |
| 281 | // dynamically configure with correct target |
| 282 | theConfig.put( targetProp, "(filterprop=" + filterProp + ")" ); |
| 283 | configure( pid ); |
| 284 | delay(); |
| 285 | |
David Jencks | c4773f2 | 2014-06-15 01:09:31 +0000 | [diff] [blame] | 286 | findComponentConfigurationByName(pid, ComponentConfigurationDTO.ACTIVE); |
Felix Meschberger | 738751a | 2012-05-31 16:51:54 +0000 | [diff] [blame] | 287 | TestCase.assertNotNull( SimpleComponent.INSTANCE ); |
| 288 | TestCase.assertEquals( PROP_NAME, SimpleComponent.INSTANCE.getProperty( PROP_NAME ) ); |
| 289 | TestCase.assertEquals( pid, SimpleComponent.INSTANCE.getProperty( Constants.SERVICE_PID ) ); |
| 290 | |
| 291 | final SimpleComponent instance = SimpleComponent.INSTANCE; |
| 292 | |
| 293 | configure( pid ); |
| 294 | delay(); |
| 295 | |
| 296 | // same instance after reconfiguration |
David Jencks | c4773f2 | 2014-06-15 01:09:31 +0000 | [diff] [blame] | 297 | findComponentConfigurationByName(pid, ComponentConfigurationDTO.ACTIVE); |
Felix Meschberger | 738751a | 2012-05-31 16:51:54 +0000 | [diff] [blame] | 298 | TestCase.assertEquals( instance, SimpleComponent.INSTANCE ); |
| 299 | TestCase.assertEquals( PROP_NAME, SimpleComponent.INSTANCE.getProperty( PROP_NAME ) ); |
| 300 | TestCase.assertEquals( pid, SimpleComponent.INSTANCE.getProperty( Constants.SERVICE_PID ) ); |
David Jencks | a4af0eb | 2013-01-29 06:54:24 +0000 | [diff] [blame] | 301 | TestCase.assertNotNull( SimpleComponent.INSTANCE.m_singleRef ); |
Felix Meschberger | 738751a | 2012-05-31 16:51:54 +0000 | [diff] [blame] | 302 | |
| 303 | // reconfigure without target --> unsatisifed |
| 304 | theConfig.remove( targetProp ); |
| 305 | configure( pid ); |
| 306 | delay(); |
| 307 | |
| 308 | // mandatory ref missing --> component unsatisfied |
David Jencks | c4773f2 | 2014-06-15 01:09:31 +0000 | [diff] [blame] | 309 | findComponentConfigurationByName(pid, ComponentConfigurationDTO.UNSATISFIED); |
Felix Meschberger | 738751a | 2012-05-31 16:51:54 +0000 | [diff] [blame] | 310 | |
| 311 | deleteConfig( pid ); |
| 312 | delay(); |
| 313 | |
| 314 | // mandatory ref missing --> component unsatisfied |
David Jencks | c4773f2 | 2014-06-15 01:09:31 +0000 | [diff] [blame] | 315 | findComponentConfigurationByName(pid, ComponentConfigurationDTO.UNSATISFIED); |
Felix Meschberger | 738751a | 2012-05-31 16:51:54 +0000 | [diff] [blame] | 316 | |
David Jencks | c4773f2 | 2014-06-15 01:09:31 +0000 | [diff] [blame] | 317 | disableAndCheck(cc); |
Felix Meschberger | 738751a | 2012-05-31 16:51:54 +0000 | [diff] [blame] | 318 | TestCase.assertNull( SimpleComponent.INSTANCE ); |
| 319 | } |
| 320 | finally |
| 321 | { |
| 322 | theConfig.remove( targetProp ); |
| 323 | if ( service != null ) |
| 324 | { |
| 325 | service.drop(); |
| 326 | } |
| 327 | } |
| 328 | } |
| 329 | |
David Jencks | ef3ee75 | 2013-02-15 02:34:58 +0000 | [diff] [blame] | 330 | /** |
| 331 | * FELIX-3902. Start with filter matching two services, remove one, then change the filter |
| 332 | * to (still) match the other one. 2nd service should remain bound. |
| 333 | */ |
| 334 | @Test |
David Jencks | bae4484 | 2014-06-21 20:15:24 +0000 | [diff] [blame] | 335 | public void test_SimpleComponent_dynamic_optional_configuration_with_required_service2() throws Exception |
David Jencks | ef3ee75 | 2013-02-15 02:34:58 +0000 | [diff] [blame] | 336 | { |
| 337 | final String targetProp = "ref.target"; |
| 338 | final String filterProp1 = "one"; |
| 339 | final String filterProp2 = "two"; |
| 340 | final SimpleServiceImpl service1 = SimpleServiceImpl.create( bundleContext, "one", 1 ).setFilterProperty( filterProp1 ); |
| 341 | final SimpleServiceImpl service2 = SimpleServiceImpl.create( bundleContext, "two", 2 ).setFilterProperty( filterProp2 ); |
| 342 | try |
| 343 | { |
| 344 | final String pid = "DynamicConfigurationComponentWithRequiredReference"; |
David Jencks | ef3ee75 | 2013-02-15 02:34:58 +0000 | [diff] [blame] | 345 | deleteConfig( pid ); |
| 346 | delay(); |
| 347 | |
David Jencks | ef3ee75 | 2013-02-15 02:34:58 +0000 | [diff] [blame] | 348 | // mandatory ref missing --> component unsatisfied |
David Jencks | c4773f2 | 2014-06-15 01:09:31 +0000 | [diff] [blame] | 349 | ComponentConfigurationDTO cc = getDisabledConfigurationAndEnable(pid, ComponentConfigurationDTO.UNSATISFIED); |
David Jencks | ef3ee75 | 2013-02-15 02:34:58 +0000 | [diff] [blame] | 350 | |
| 351 | // dynamically configure without the correct target |
| 352 | configure( pid ); |
| 353 | delay(); |
| 354 | |
| 355 | // mandatory ref missing --> component unsatisfied |
David Jencks | c4773f2 | 2014-06-15 01:09:31 +0000 | [diff] [blame] | 356 | findComponentConfigurationByName(pid, ComponentConfigurationDTO.UNSATISFIED); |
David Jencks | ef3ee75 | 2013-02-15 02:34:58 +0000 | [diff] [blame] | 357 | |
| 358 | // dynamically configure with correct target |
| 359 | theConfig.put( targetProp, "(|(filterprop=" + filterProp1 + ")(filterprop=" + filterProp2 + "))" ); |
| 360 | configure( pid ); |
| 361 | delay(); |
| 362 | |
David Jencks | c4773f2 | 2014-06-15 01:09:31 +0000 | [diff] [blame] | 363 | findComponentConfigurationByName(pid, ComponentConfigurationDTO.ACTIVE); |
David Jencks | ef3ee75 | 2013-02-15 02:34:58 +0000 | [diff] [blame] | 364 | TestCase.assertNotNull( SimpleComponent.INSTANCE ); |
| 365 | TestCase.assertEquals( PROP_NAME, SimpleComponent.INSTANCE.getProperty( PROP_NAME ) ); |
| 366 | TestCase.assertEquals( pid, SimpleComponent.INSTANCE.getProperty( Constants.SERVICE_PID ) ); |
| 367 | |
| 368 | final SimpleComponent instance = SimpleComponent.INSTANCE; |
| 369 | |
| 370 | configure( pid ); |
| 371 | delay(); |
| 372 | |
| 373 | //remove higher ranked service |
| 374 | if (service2 != null) |
| 375 | { |
| 376 | service2.drop(); |
| 377 | } |
| 378 | // same instance after reconfiguration |
David Jencks | c4773f2 | 2014-06-15 01:09:31 +0000 | [diff] [blame] | 379 | findComponentConfigurationByName(pid, ComponentConfigurationDTO.ACTIVE); |
David Jencks | ef3ee75 | 2013-02-15 02:34:58 +0000 | [diff] [blame] | 380 | TestCase.assertEquals( instance, SimpleComponent.INSTANCE ); |
| 381 | TestCase.assertEquals( PROP_NAME, SimpleComponent.INSTANCE.getProperty( PROP_NAME ) ); |
| 382 | TestCase.assertEquals( pid, SimpleComponent.INSTANCE.getProperty( Constants.SERVICE_PID ) ); |
| 383 | TestCase.assertNotNull( SimpleComponent.INSTANCE.m_singleRef ); |
| 384 | |
| 385 | // reconfigure with new filter --> active |
| 386 | theConfig.put( targetProp, "(filterprop=" + filterProp1 + ")" ); |
| 387 | configure( pid ); |
| 388 | delay(); |
| 389 | |
| 390 | // same instance after reconfiguration |
David Jencks | c4773f2 | 2014-06-15 01:09:31 +0000 | [diff] [blame] | 391 | findComponentConfigurationByName(pid, ComponentConfigurationDTO.ACTIVE); |
David Jencks | ef3ee75 | 2013-02-15 02:34:58 +0000 | [diff] [blame] | 392 | TestCase.assertEquals( instance, SimpleComponent.INSTANCE ); |
| 393 | TestCase.assertEquals( PROP_NAME, SimpleComponent.INSTANCE.getProperty( PROP_NAME ) ); |
| 394 | TestCase.assertEquals( pid, SimpleComponent.INSTANCE.getProperty( Constants.SERVICE_PID ) ); |
| 395 | TestCase.assertNotNull( SimpleComponent.INSTANCE.m_singleRef ); |
| 396 | |
| 397 | deleteConfig( pid ); |
| 398 | delay(); |
| 399 | |
| 400 | // mandatory ref missing --> component unsatisfied |
David Jencks | c4773f2 | 2014-06-15 01:09:31 +0000 | [diff] [blame] | 401 | findComponentConfigurationByName(pid, ComponentConfigurationDTO.UNSATISFIED); |
David Jencks | ef3ee75 | 2013-02-15 02:34:58 +0000 | [diff] [blame] | 402 | |
David Jencks | c4773f2 | 2014-06-15 01:09:31 +0000 | [diff] [blame] | 403 | disableAndCheck(cc); |
David Jencks | ef3ee75 | 2013-02-15 02:34:58 +0000 | [diff] [blame] | 404 | TestCase.assertNull( SimpleComponent.INSTANCE ); |
| 405 | } |
| 406 | finally |
| 407 | { |
| 408 | theConfig.remove( targetProp ); |
| 409 | if ( service1 != null ) |
| 410 | { |
| 411 | service1.drop(); |
| 412 | } |
| 413 | } |
| 414 | } |
| 415 | |
David Jencks | a4af0eb | 2013-01-29 06:54:24 +0000 | [diff] [blame] | 416 | @Test |
David Jencks | c4773f2 | 2014-06-15 01:09:31 +0000 | [diff] [blame] | 417 | public void test_SimpleComponent_dynamic_optional_configuration_with_optional_service() throws Exception |
David Jencks | a4af0eb | 2013-01-29 06:54:24 +0000 | [diff] [blame] | 418 | { |
| 419 | final String targetProp = "ref.target"; |
| 420 | final String filterProp = "required"; |
| 421 | final SimpleServiceImpl service = SimpleServiceImpl.create( bundleContext, "sample" ).setFilterProperty( filterProp ); |
| 422 | try |
| 423 | { |
| 424 | final String pid = "DynamicConfigurationComponentWithOptionalReference"; |
David Jencks | a4af0eb | 2013-01-29 06:54:24 +0000 | [diff] [blame] | 425 | deleteConfig( pid ); |
| 426 | delay(); |
| 427 | |
David Jencks | a4af0eb | 2013-01-29 06:54:24 +0000 | [diff] [blame] | 428 | // optional ref missing --> component active |
David Jencks | c4773f2 | 2014-06-15 01:09:31 +0000 | [diff] [blame] | 429 | ComponentConfigurationDTO cc = getDisabledConfigurationAndEnable(pid, ComponentConfigurationDTO.ACTIVE); |
| 430 | |
David Jencks | a4af0eb | 2013-01-29 06:54:24 +0000 | [diff] [blame] | 431 | TestCase.assertNotNull( SimpleComponent.INSTANCE ); |
| 432 | final SimpleComponent instance = SimpleComponent.INSTANCE; |
| 433 | |
| 434 | // dynamically configure without the correct target |
| 435 | configure( pid ); |
| 436 | delay(); |
| 437 | |
| 438 | // optional ref missing --> component active |
David Jencks | c4773f2 | 2014-06-15 01:09:31 +0000 | [diff] [blame] | 439 | findComponentConfigurationByName(pid, ComponentConfigurationDTO.ACTIVE); |
David Jencks | a4af0eb | 2013-01-29 06:54:24 +0000 | [diff] [blame] | 440 | TestCase.assertEquals( instance, SimpleComponent.INSTANCE ); |
| 441 | TestCase.assertNull( SimpleComponent.INSTANCE.m_singleRef ); |
| 442 | |
| 443 | // dynamically configure with correct target |
| 444 | theConfig.put( targetProp, "(filterprop=" + filterProp + ")" ); |
| 445 | configure( pid ); |
| 446 | delay(); |
| 447 | |
David Jencks | c4773f2 | 2014-06-15 01:09:31 +0000 | [diff] [blame] | 448 | findComponentConfigurationByName(pid, ComponentConfigurationDTO.ACTIVE); |
David Jencks | a4af0eb | 2013-01-29 06:54:24 +0000 | [diff] [blame] | 449 | TestCase.assertEquals( instance, SimpleComponent.INSTANCE ); |
| 450 | TestCase.assertEquals( PROP_NAME, SimpleComponent.INSTANCE.getProperty( PROP_NAME ) ); |
| 451 | TestCase.assertEquals( pid, SimpleComponent.INSTANCE.getProperty( Constants.SERVICE_PID ) ); |
| 452 | TestCase.assertNotNull( SimpleComponent.INSTANCE.m_singleRef ); |
| 453 | |
| 454 | configure( pid ); |
| 455 | delay(); |
| 456 | |
| 457 | // same instance after reconfiguration |
David Jencks | c4773f2 | 2014-06-15 01:09:31 +0000 | [diff] [blame] | 458 | findComponentConfigurationByName(pid, ComponentConfigurationDTO.ACTIVE); |
David Jencks | a4af0eb | 2013-01-29 06:54:24 +0000 | [diff] [blame] | 459 | TestCase.assertEquals( instance, SimpleComponent.INSTANCE ); |
| 460 | TestCase.assertEquals( PROP_NAME, SimpleComponent.INSTANCE.getProperty( PROP_NAME ) ); |
| 461 | TestCase.assertEquals( pid, SimpleComponent.INSTANCE.getProperty( Constants.SERVICE_PID ) ); |
| 462 | TestCase.assertNotNull( SimpleComponent.INSTANCE.m_singleRef ); |
| 463 | |
| 464 | // reconfigure without target --> active |
| 465 | theConfig.remove( targetProp ); |
| 466 | configure( pid ); |
| 467 | delay(); |
| 468 | |
| 469 | // optional ref missing --> component active |
David Jencks | c4773f2 | 2014-06-15 01:09:31 +0000 | [diff] [blame] | 470 | findComponentConfigurationByName(pid, ComponentConfigurationDTO.ACTIVE); |
David Jencks | a4af0eb | 2013-01-29 06:54:24 +0000 | [diff] [blame] | 471 | TestCase.assertEquals( instance, SimpleComponent.INSTANCE ); |
| 472 | TestCase.assertNull( SimpleComponent.INSTANCE.m_singleRef ); |
| 473 | |
| 474 | deleteConfig( pid ); |
| 475 | delay(); |
| 476 | |
| 477 | // optional ref missing --> component active |
David Jencks | c4773f2 | 2014-06-15 01:09:31 +0000 | [diff] [blame] | 478 | findComponentConfigurationByName(pid, ComponentConfigurationDTO.ACTIVE); |
David Jencks | acb8321 | 2014-04-30 18:01:44 +0000 | [diff] [blame] | 479 | TestCase.assertNotSame( instance, SimpleComponent.INSTANCE ); |
David Jencks | a4af0eb | 2013-01-29 06:54:24 +0000 | [diff] [blame] | 480 | TestCase.assertNull( SimpleComponent.INSTANCE.m_singleRef ); |
| 481 | |
David Jencks | c4773f2 | 2014-06-15 01:09:31 +0000 | [diff] [blame] | 482 | disableAndCheck(cc); |
David Jencks | a4af0eb | 2013-01-29 06:54:24 +0000 | [diff] [blame] | 483 | TestCase.assertNull( SimpleComponent.INSTANCE ); |
| 484 | } |
| 485 | finally |
| 486 | { |
| 487 | // Thread.sleep( 60000 ); |
| 488 | theConfig.remove( targetProp ); |
| 489 | if ( service != null ) |
| 490 | { |
| 491 | service.drop(); |
| 492 | } |
| 493 | } |
| 494 | } |
| 495 | |
Felix Meschberger | 738751a | 2012-05-31 16:51:54 +0000 | [diff] [blame] | 496 | |
| 497 | @Test |
David Jencks | bae4484 | 2014-06-21 20:15:24 +0000 | [diff] [blame] | 498 | public void test_SimpleComponent_factory_configuration() throws Exception |
Felix Meschberger | 4dab8ea | 2009-07-31 14:44:12 +0000 | [diff] [blame] | 499 | { |
Felix Meschberger | 2e88542 | 2009-08-21 11:35:00 +0000 | [diff] [blame] | 500 | final String factoryPid = "FactoryConfigurationComponent"; |
| 501 | |
| 502 | deleteFactoryConfigurations( factoryPid ); |
| 503 | delay(); |
| 504 | |
David Jencks | c4773f2 | 2014-06-15 01:09:31 +0000 | [diff] [blame] | 505 | getConfigurationsDisabledThenEnable(factoryPid, 0, -1); |
Felix Meschberger | 2e88542 | 2009-08-21 11:35:00 +0000 | [diff] [blame] | 506 | TestCase.assertTrue( SimpleComponent.INSTANCES.isEmpty() ); |
| 507 | |
| 508 | // create two factory configurations expecting two components |
| 509 | final String pid0 = createFactoryConfiguration( factoryPid ); |
| 510 | final String pid1 = createFactoryConfiguration( factoryPid ); |
| 511 | delay(); |
| 512 | |
David Jencks | c4773f2 | 2014-06-15 01:09:31 +0000 | [diff] [blame] | 513 | // expect two active components, //TODO WTF?? only first is active, second is disabled |
| 514 | checkConfigurationCount(factoryPid, 2, ComponentConfigurationDTO.ACTIVE); |
David Jencks | d02418a | 2014-06-15 01:10:02 +0000 | [diff] [blame] | 515 | // delete a configuration |
| 516 | deleteConfig( pid0 ); |
| 517 | delay(); |
| 518 | |
| 519 | // expect one component |
| 520 | checkConfigurationCount(factoryPid, 1, ComponentConfigurationDTO.ACTIVE); |
| 521 | |
| 522 | // delete second configuration |
| 523 | deleteConfig( pid1 ); |
| 524 | delay(); |
| 525 | |
| 526 | checkConfigurationCount(factoryPid, 0, ComponentConfigurationDTO.ACTIVE); |
| 527 | } |
| 528 | |
| 529 | /** |
| 530 | * same as test_SimpleComponent_factory_configuration except configurations are present before |
| 531 | * component is enabled to test initialization. |
| 532 | */ |
| 533 | @Test |
David Jencks | bae4484 | 2014-06-21 20:15:24 +0000 | [diff] [blame] | 534 | public void test_SimpleComponent_factory_configuration_initialize() throws Exception |
David Jencks | d02418a | 2014-06-15 01:10:02 +0000 | [diff] [blame] | 535 | { |
| 536 | final String factoryPid = "FactoryConfigurationComponent"; |
| 537 | |
| 538 | deleteFactoryConfigurations( factoryPid ); |
| 539 | |
| 540 | // create two factory configurations expecting two components |
| 541 | final String pid0 = createFactoryConfiguration( factoryPid ); |
| 542 | final String pid1 = createFactoryConfiguration( factoryPid ); |
| 543 | delay(); |
| 544 | |
| 545 | getConfigurationsDisabledThenEnable(factoryPid, 2, ComponentConfigurationDTO.ACTIVE); |
Felix Meschberger | 2e88542 | 2009-08-21 11:35:00 +0000 | [diff] [blame] | 546 | |
| 547 | // delete a configuration |
| 548 | deleteConfig( pid0 ); |
| 549 | delay(); |
| 550 | |
| 551 | // expect one component |
David Jencks | c4773f2 | 2014-06-15 01:09:31 +0000 | [diff] [blame] | 552 | checkConfigurationCount(factoryPid, 1, ComponentConfigurationDTO.ACTIVE); |
Felix Meschberger | 2e88542 | 2009-08-21 11:35:00 +0000 | [diff] [blame] | 553 | |
| 554 | // delete second configuration |
| 555 | deleteConfig( pid1 ); |
| 556 | delay(); |
| 557 | |
David Jencks | c4773f2 | 2014-06-15 01:09:31 +0000 | [diff] [blame] | 558 | checkConfigurationCount(factoryPid, 0, ComponentConfigurationDTO.ACTIVE); |
Felix Meschberger | 4dab8ea | 2009-07-31 14:44:12 +0000 | [diff] [blame] | 559 | } |
| 560 | |
Felix Meschberger | f96e10c | 2010-03-24 08:15:51 +0000 | [diff] [blame] | 561 | @Test |
David Jencks | bae4484 | 2014-06-21 20:15:24 +0000 | [diff] [blame] | 562 | public void test_SimpleComponent_factory_configuration_enabled() throws Exception |
Felix Meschberger | f96e10c | 2010-03-24 08:15:51 +0000 | [diff] [blame] | 563 | { |
| 564 | final String factoryPid = "FactoryConfigurationComponent_enabled"; |
| 565 | |
| 566 | deleteFactoryConfigurations( factoryPid ); |
| 567 | delay(); |
| 568 | |
David Jencks | c4773f2 | 2014-06-15 01:09:31 +0000 | [diff] [blame] | 569 | checkConfigurationCount(factoryPid, 0, ComponentConfigurationDTO.ACTIVE); |
| 570 | // no component config exists without configuration |
Felix Meschberger | f96e10c | 2010-03-24 08:15:51 +0000 | [diff] [blame] | 571 | |
| 572 | // create two factory configurations expecting two components |
| 573 | final String pid0 = createFactoryConfiguration( factoryPid ); |
| 574 | final String pid1 = createFactoryConfiguration( factoryPid ); |
| 575 | delay(); |
| 576 | |
| 577 | // expect two components, all active |
David Jencks | c4773f2 | 2014-06-15 01:09:31 +0000 | [diff] [blame] | 578 | checkConfigurationCount(factoryPid, 2, ComponentConfigurationDTO.ACTIVE); |
Felix Meschberger | f96e10c | 2010-03-24 08:15:51 +0000 | [diff] [blame] | 579 | |
| 580 | // disable the name component |
David Jencks | c4773f2 | 2014-06-15 01:09:31 +0000 | [diff] [blame] | 581 | disableAndCheck( factoryPid ); |
Felix Meschberger | f96e10c | 2010-03-24 08:15:51 +0000 | [diff] [blame] | 582 | delay(); |
| 583 | |
Felix Meschberger | f96e10c | 2010-03-24 08:15:51 +0000 | [diff] [blame] | 584 | |
| 585 | // create a configuration |
| 586 | final String pid3 = createFactoryConfiguration( factoryPid ); |
| 587 | delay(); |
| 588 | |
David Jencks | d02418a | 2014-06-15 01:10:02 +0000 | [diff] [blame] | 589 | getConfigurationsDisabledThenEnable(factoryPid, 3, ComponentConfigurationDTO.ACTIVE); |
David Jencks | c4773f2 | 2014-06-15 01:09:31 +0000 | [diff] [blame] | 590 | |
Felix Meschberger | f96e10c | 2010-03-24 08:15:51 +0000 | [diff] [blame] | 591 | } |
| 592 | |
David Jencks | c4773f2 | 2014-06-15 01:09:31 +0000 | [diff] [blame] | 593 | |
Felix Meschberger | 47eb037 | 2009-07-28 13:48:28 +0000 | [diff] [blame] | 594 | } |