-
Notifications
You must be signed in to change notification settings - Fork 55
Closed
Description
#I have been getting different results when using the Ruby SDK.
System Info:
ruby 2.3.3p222 (2016-11-21 revision 56859) [x86_64-darwin17]
Mac OS Sierra
java version "1.8.0_151"
Java(TM) SE Runtime Environment (build 1.8.0_151-b12)
Java HotSpot(TM) 64-Bit Server VM (build 25.151-b12, mixed mode)
I have a user with key: tenant3 that was in variation = true.
I moved the user to be in variation = false for a feature-flag called "false"
However, I occasionally see true.
class LaunchDarklyTest
def initialize
end
def testFlag
user = {
:key => "tenant3",
}
while true do
ld_client = LaunchDarkly::LDClient.new("sdk-afc32799-580f-4a97-9db7-24e6742b01c6")
puts ld_client.variation("test", user, false)
end
end
end
LaunchDarklyTest.new.testFlagExpected Result:
$ ruby ld.rb
false
false
false
false
false
false
false
false
false
false
false
false
false
false
false
false
false
false
false
true
false
false
true
false
false
true
false
true
true
Could you please help me understand if I am doing anything incorrectly or if this is an issue with ruby-sdk??
Doing the same thing using Java-SDK gives me accurate result
import com.launchdarkly.client.*;
public class LaunchDarkly {
public static void main(String[] args) {
LDClient ldClient = new LDClient("sdk-afc32799-580f-4a97-9db7-24e6742b01c6");
LDUser user = new LDUser("tenant3");
while (true) {
boolean showFeature = ldClient.boolVariation("test", user, false);
if (showFeature) {
System.out.println("true");
} else {
System.out.println("false");
}
}
}
}Metadata
Metadata
Assignees
Labels
No labels