Uploaded image for project: 'Infinispan'
  1. Infinispan
  2. ISPN-1138

Double override of BooleanAttributeType doesn't work

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 5.0.0.CR4
    • 5.0.0.CR3
    • Configuration
    • None
    • Workaround Exists
    • Hide

      Paul, the same thing can be achieved with:

      Configuration override = new Configuration();
      override.fluent().invocationBatching();
      assert override.isInvocationBatchingEnabled();
      assert cm.defineConfiguration("test1", override).isInvocationBatchingEnabled();
      assert cm.defineConfiguration("test2", "test1", new Configuration()).isInvocationBatchingEnabled();

      Where you take an existing configuration and create a brand new one out of it without any overrides.

      Show
      Paul, the same thing can be achieved with: Configuration override = new Configuration(); override.fluent().invocationBatching(); assert override.isInvocationBatchingEnabled(); assert cm.defineConfiguration( "test1" , override).isInvocationBatchingEnabled(); assert cm.defineConfiguration( "test2" , "test1" , new Configuration()).isInvocationBatchingEnabled(); Where you take an existing configuration and create a brand new one out of it without any overrides.

      The following test fails on the last assertion:

      @Test
      public void invocationBatching() {
          System.out.println(org.infinispan.Version.printVersion());
          EmbeddedCacheManager manager = new DefaultCacheManager(new GlobalConfiguration(), new Configuration());
          Configuration override = new Configuration();
          override.fluent().invocationBatching();
          assert override.isInvocationBatchingEnabled();
          assert manager.defineConfiguration("test1", override).isInvocationBatchingEnabled();
          Configuration config = new Configuration();
          config.applyOverrides(override);
          assert config.isInvocationBatchingEnabled();
          assert manager.defineConfiguration("test2", config).isInvocationBatchingEnabled();
      }

      In the above code, the last assertion fails.

      If you modify the above code to test for isIndexingEnabled(), the same failure occurs. The problem is likely generalizable to all boolean configuration properties.

              rh-ee-galder Galder ZamarreƱo
              pferraro@redhat.com Paul Ferraro
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: