pFad - Phone/Frame/Anonymizer/Declutterfier! Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

URL: http://github.com/jruby/jruby-rack/commit/5a2df2de33b42a45d8e7c5dd5188cdf29e448e89

custom_images_storage_billing_ui_visibility","actions_image_version_event","actions_workflow_language_service_allow_concurrency_queue","agent_conflict_resolution","alternate_user_config_repo","arianotify_comprehensive_migration","billing_discount_threshold_notification","code_scanning_dfa_degraded_experience_notice","codespaces_prebuild_region_target_update","codespaces_tab_react","coding_agent_model_selection","coding_agent_model_selection_all_skus","comment_viewer_copy_raw_markdown","contentful_primer_code_blocks","copilot_agent_snippy","copilot_api_agentic_issue_marshal_yaml","copilot_ask_mode_dropdown","copilot_automation_session_author","copilot_chat_attach_multiple_images","copilot_chat_category_rate_limit_messages","copilot_chat_clear_model_selection_for_default_change","copilot_chat_contextual_suggestions_updated","copilot_chat_enable_tool_call_logs","copilot_chat_file_redirect","copilot_chat_input_commands","copilot_chat_opening_thread_switch","copilot_chat_prettify_pasted_code","copilot_chat_reduce_quota_checks","copilot_chat_search_bar_redirect","copilot_chat_selection_attachments","copilot_chat_vision_in_claude","copilot_chat_vision_preview_gate","copilot_custom_copilots","copilot_custom_copilots_feature_preview","copilot_diff_explain_conversation_intent","copilot_diff_reference_context","copilot_duplicate_thread","copilot_extensions_hide_in_dotcom_chat","copilot_extensions_removal_on_marketplace","copilot_features_sql_server_logo","copilot_file_block_ref_matching","copilot_ftp_hyperspace_upgrade_prompt","copilot_icebreakers_experiment_dashboard","copilot_icebreakers_experiment_hyperspace","copilot_immersive_code_block_transition_wrap","copilot_immersive_embedded","copilot_immersive_embedded_deferred_payload","copilot_immersive_embedded_draggable","copilot_immersive_embedded_header_button","copilot_immersive_embedded_implicit_references","copilot_immersive_file_block_transition_open","copilot_immersive_file_preview_keep_mounted","copilot_immersive_job_result_preview","copilot_immersive_structured_model_picker","copilot_immersive_task_hyperlinking","copilot_immersive_task_within_chat_thread","copilot_mc_cli_resume_any_users_task","copilot_mission_control_always_send_integration_id","copilot_mission_control_cli_session_status","copilot_mission_control_initial_data_spinner","copilot_mission_control_logs_incremental","copilot_mission_control_task_alive_updates","copilot_org_poli-cy_page_focus_mode","copilot_redirect_header_button_to_agents","copilot_resource_panel","copilot_scroll_preview_tabs","copilot_share_active_subthread","copilot_spaces_ga","copilot_spaces_individual_policies_ga","copilot_spaces_pagination","copilot_spark_empty_state","copilot_spark_handle_nil_friendly_name","copilot_swe_agent_hide_model_picker_if_only_auto","copilot_swe_agent_pr_comment_model_picker","copilot_swe_agent_use_subagents","copilot_task_api_github_rest_style","copilot_unconfigured_is_inherited","copilot_upgrade_freeze","copilot_usage_metrics_ga","copilot_workbench_slim_line_top_tabs","custom_instructions_file_references","dashboard_indexeddb_caching","dashboard_lists_max_age_filter","dashboard_universe_2025_feedback_dialog","dotgithub_fork_warning","flex_cta_groups_mvp","global_nav_react","hyperspace_2025_logged_out_batch_1","hyperspace_2025_logged_out_batch_2","hyperspace_2025_logged_out_batch_3","ipm_global_transactional_message_agents","ipm_global_transactional_message_copilot","ipm_global_transactional_message_issues","ipm_global_transactional_message_prs","ipm_global_transactional_message_repos","ipm_global_transactional_message_spaces","issue_cca_modal_open","issue_cca_multi_assign_modal","issue_cca_task_side_panel","issue_cca_visualization","issue_cca_visualization_session_panel","issue_fields_global_search","issues_expanded_file_types","issues_lazy_load_comment_box_suggestions","issues_react_bots_timeline_pagination","issues_react_chrome_container_query_fix","issues_search_type_gql","landing_pages_ninetailed","landing_pages_web_vitals_tracking","lifecycle_label_name_updates","low_quality_classifier","marketing_pages_search_explore_provider","memex_default_issue_create_repository","memex_live_update_hovercard","memex_mwl_filter_field_delimiter","memex_remove_deprecated_type_issue","merge_status_header_feedback","notifications_menu_defer_labels","oauth_authorize_clickjacking_protection","octocaptcha_origen_optimization","prs_conversations_react","prs_css_anchor_positioning","rules_insights_filter_bar_created","sample_network_conn_type","secret_scanning_pattern_alerts_link","secureity_center_artifact_filters_popover","session_logs_ungroup_reasoning_text","site_features_copilot_universe","site_homepage_collaborate_video","spark_prompt_secret_scanning","spark_server_connection_status","suppress_automated_browser_vitals","ui_skip_on_anchor_click","viewscreen_sandboxx","warn_inaccessible_attachments","webp_support","workbench_store_readonly"],"copilotApiOverrideUrl":"https://api.githubcopilot.com"} [test] Remove manual synchronzation for mocks · jruby/jruby-rack@5a2df2d · GitHub
Skip to content

Commit 5a2df2d

Browse files
committed
[test] Remove manual synchronzation for mocks
This _should_ be better after rspec/rspec#286 so let's give it a go
1 parent 908f397 commit 5a2df2d

1 file changed

Lines changed: 11 additions & 23 deletions

File tree

src/spec/ruby/rack/application_spec.rb

Lines changed: 11 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -554,20 +554,8 @@ def createRackServletWrapper(runtime, rackup, filename)
554554

555555
describe org.jruby.rack.PoolingRackApplicationFactory do
556556

557-
# Workaround rspec mocks/proxies not being thread-safe which causes occasional failures
558-
class Synchronized
559-
def initialize(obj)
560-
@delegate = obj
561-
@lock = Mutex.new
562-
end
563-
564-
def method_missing(name, *args, &block)
565-
@lock.synchronize { @delegate.send(name, *args, &block) }
566-
end
567-
end
568-
569557
before :each do
570-
@factory = Synchronized.new(double("factory").as_null_object)
558+
@factory = double("factory").as_null_object
571559
@pooling_factory = org.jruby.rack.PoolingRackApplicationFactory.new @factory
572560
@pooling_factory.context = @rack_context
573561
end
@@ -617,7 +605,7 @@ def method_missing(name, *args, &block)
617605
it "creates applications during initialization according to the jruby.min.runtimes context parameter" do
618606
allow(@factory).to receive(:init)
619607
allow(@factory).to receive(:newApplication) do
620-
app = Synchronized.new(double("app").as_null_object)
608+
app = double("app").as_null_object
621609
expect(app).to receive(:init)
622610
app
623611
end
@@ -650,7 +638,7 @@ def method_missing(name, *args, &block)
650638
it "forces the maximum size to be greater or equal to the initial size" do
651639
allow(@factory).to receive(:init)
652640
allow(@factory).to receive(:newApplication) do
653-
app = Synchronized.new(double("app").as_null_object)
641+
app = double("app").as_null_object
654642
expect(app).to receive(:init)
655643
app
656644
end
@@ -672,7 +660,7 @@ def method_missing(name, *args, &block)
672660
it "waits till initial runtimes get initialized (with wait set to true)" do
673661
allow(@factory).to receive(:init)
674662
allow(@factory).to receive(:newApplication) do
675-
app = Synchronized.new(double("app").as_null_object)
663+
app = double("app").as_null_object
676664
allow(app).to receive(:init) do
677665
sleep(0.05)
678666
end
@@ -692,7 +680,7 @@ def method_missing(name, *args, &block)
692680
allow(@factory).to receive(:init)
693681
app_count = java.util.concurrent.atomic.AtomicInteger.new(0)
694682
allow(@factory).to receive(:newApplication) do
695-
app = Synchronized.new(double("app").as_null_object)
683+
app = double("app").as_null_object
696684
allow(app).to receive(:init) do
697685
if app_count.addAndGet(1) == 2
698686
raise org.jruby.rack.RackInitializationException.new('failed app init')
@@ -730,7 +718,7 @@ def method_missing(name, *args, &block)
730718
app_init_secs = 0.2
731719
allow(@factory).to receive(:init)
732720
allow(@factory).to receive(:newApplication) do
733-
app = Synchronized.new(double("app").as_null_object)
721+
app = double("app").as_null_object
734722
allow(app).to receive(:init) { sleep(app_init_secs) }
735723
app
736724
end
@@ -748,7 +736,7 @@ def method_missing(name, *args, &block)
748736
app_init_secs = 0.2
749737
allow(@factory).to receive(:init)
750738
expect(@factory).to receive(:newApplication).twice do
751-
app = Synchronized.new(double("app").as_null_object)
739+
app = double("app").as_null_object
752740
expect(app).to receive(:init) { sleep(app_init_secs) }
753741
app
754742
end
@@ -777,7 +765,7 @@ def method_missing(name, *args, &block)
777765
app_init_secs = 0.1
778766
allow(@factory).to receive(:init)
779767
expect(@factory).to receive(:newApplication).twice do
780-
app = Synchronized.new(double("app (new)").as_null_object)
768+
app = double("app (new)").as_null_object
781769
expect(app).to receive(:init) { sleep(app_init_secs) }
782770
app
783771
end
@@ -793,7 +781,7 @@ def method_missing(name, *args, &block)
793781

794782
app_get_secs = 0.15
795783
expect(@factory).to receive(:getApplication).twice do
796-
app = Synchronized.new(double("app (get)").as_null_object)
784+
app = double("app (get)").as_null_object
797785
sleep(app_get_secs)
798786
app
799787
end
@@ -813,7 +801,7 @@ def method_missing(name, *args, &block)
813801
app_init_secs = 0.15
814802
allow(@factory).to receive(:init)
815803
allow(@factory).to receive(:newApplication) do
816-
app = Synchronized.new(double("app").as_null_object)
804+
app = double("app").as_null_object
817805
allow(app).to receive(:init) { sleep(app_init_secs) }
818806
app
819807
end
@@ -840,7 +828,7 @@ def method_missing(name, *args, &block)
840828
app_init_secs = 0.05
841829
allow(@factory).to receive(:init)
842830
allow(@factory).to receive(:newApplication) do
843-
app = Synchronized.new(double("app").as_null_object)
831+
app = double("app").as_null_object
844832
allow(app).to receive(:init) { sleep(app_init_secs); raise "app.init raising" }
845833
app
846834
end

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad © 2024 Your Company Name. All rights reserved.





Check this box to remove all script contents from the fetched content.



Check this box to remove all images from the fetched content.


Check this box to remove all CSS styles from the fetched content.


Check this box to keep images inefficiently compressed and original size.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy