32
32
import org .junit .runner .RunWith ;
33
33
34
34
import org .apache .geode .cache .DataPolicy ;
35
- import org .apache .geode .cache .GemFireCache ;
36
35
37
36
import org .springframework .beans .factory .annotation .Autowired ;
38
37
import org .springframework .boot .autoconfigure .SpringBootApplication ;
39
38
import org .springframework .boot .test .context .SpringBootTest ;
40
39
import org .springframework .context .annotation .AnnotationConfigApplicationContext ;
41
- import org .springframework .context .annotation .Bean ;
42
40
import org .springframework .context .annotation .Profile ;
43
41
import org .springframework .data .gemfire .GemfireTemplate ;
44
- import org .springframework .data .gemfire .LocalRegionFactoryBean ;
45
42
import org .springframework .data .gemfire .config .annotation .CacheServerApplication ;
46
43
import org .springframework .data .gemfire .config .annotation .EnableEntityDefinedRegions ;
47
44
import org .springframework .data .gemfire .tests .integration .ForkingClientServerIntegrationTestsSupport ;
48
45
import org .springframework .geode .boot .autoconfigure .DataImportExportAutoConfiguration ;
46
+ import org .springframework .geode .config .annotation .EnableClusterAware ;
49
47
import org .springframework .geode .core .util .ObjectUtils ;
50
48
import org .springframework .geode .util .CacheUtils ;
51
49
import org .springframework .test .context .ActiveProfiles ;
76
74
* @see org.springframework.test.context.junit4.SpringRunner
77
75
* @since 1.3.0
78
76
*/
79
- @ ActiveProfiles ("IMPORT" )
77
+ @ ActiveProfiles ("IMPORT-CLIENT " )
80
78
@ RunWith (SpringRunner .class )
81
79
@ SpringBootTest (
82
80
classes = ClientCacheDataImportExportAutoConfigurationIntegrationTests .TestGeodeClientConfiguration .class ,
83
81
properties = {
84
- "spring.boot.data.gemfire.cache.data.import.active-profiles=IMPORT" ,
82
+ "spring.data.gemfire.management.use-http=false" ,
83
+ "spring.boot.data.gemfire.cache.data.import.active-profiles=IMPORT-CLIENT" ,
85
84
"spring.boot.data.gemfire.cache.region.advice.enabled=true"
86
85
}
87
86
)
@@ -163,8 +162,9 @@ public void booksWereLoaded() {
163
162
ISBN .of ("978-1-492-04034-7" ), Author .newAuthor ("Alex Petrov" ).identifiedBy (2L ));
164
163
}
165
164
166
- @ Profile ("IMPORT" )
165
+ @ Profile ("IMPORT-CLIENT " )
167
166
@ SpringBootApplication
167
+ @ EnableClusterAware
168
168
@ EnableEntityDefinedRegions (basePackageClasses = Book .class )
169
169
static class TestGeodeClientConfiguration { }
170
170
@@ -179,16 +179,5 @@ public static void main(String[] args) {
179
179
180
180
applicationContext .registerShutdownHook ();
181
181
}
182
-
183
- @ Bean ("Books" )
184
- LocalRegionFactoryBean <Object , Object > booksRegion (GemFireCache cache ) {
185
-
186
- LocalRegionFactoryBean <Object , Object > booksRegion = new LocalRegionFactoryBean <>();
187
-
188
- booksRegion .setCache (cache );
189
- booksRegion .setPersistent (false );
190
-
191
- return booksRegion ;
192
- }
193
182
}
194
183
}
0 commit comments